Whamcloud - gitweb
LU-7981 llite: take trunc_sem only at vvp layer 15/19315/4
authorPatrick Farrell <paf@cray.com>
Tue, 5 Apr 2016 15:48:57 +0000 (10:48 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 2 May 2016 23:57:54 +0000 (23:57 +0000)
commit8d795c416da2e10f56b12ead8fe1b8b2b15b7dc9
tree6fc182a93f866b93a35953ea7b590c4e2bf49e56
parentd36f00b3b7c977acf1a092d188535d34d079c57a
LU-7981 llite: take trunc_sem only at vvp layer

The lli_trunc_sem is taken in 'read' mode in both
ll_page_mkwrite and vvp_io_fault_start. This can lead to a
deadlock with another thread which asks for the semaphore
in write mode between thse two read calls.

Since all users of lli_trunc_sem are in the vvp layer, we
can satisfy the requirement to exclude truncate by taking
the semaphore only in vvp_io_fault_start.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I7341d179f550835ccebfb1bb2d90260c1d5d0ff8
Reviewed-on: http://review.whamcloud.com/19315
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andriy Skulsyh
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/llite_mmap.c