Whamcloud - gitweb
LU-649 io: DIO doesn't need lock i_mutex
authorLai Siyao <laisiyao@whamcloud.com>
Mon, 12 Dec 2011 15:12:42 +0000 (07:12 -0800)
committerJohann Lombardi <johann@whamcloud.com>
Wed, 4 Jan 2012 17:21:27 +0000 (12:21 -0500)
commit4ebec99e309fcafd1be8a0b10673d69a083ae87f
tree23cab66deecc071d4151d3b3b9120cd4d09199d9
parenta1b7b5520612943178570237b5b0462b0395d726
LU-649 io: DIO doesn't need lock i_mutex

There is a dead lock if a file is written with with normal IO, and
read with DIO at the mean time:
regular write: extent lock -> i_mutex
DIO read: i_mutex -> server take extent lock

i_mutex taken at DIO read is redundant, because server will take
extent lock to serialize with write and truncate. Removing it can
avoid the deadlock.

Change-Id: I280559cebae5d04e4fd943bf3fbe82d67e07834b
Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1829
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
lustre/llite/rw26.c