Whamcloud - gitweb
LU-13467 llite: truncate deadlock with DoM files 88/38288/3
authorAndriy Skulysh <c17819@cray.com>
Thu, 27 Feb 2020 21:15:41 +0000 (23:15 +0200)
committerOleg Drokin <green@whamcloud.com>
Fri, 19 Jun 2020 16:50:48 +0000 (16:50 +0000)
commit8958ecee22010dfa1b99220c2288f7369f490871
treee356709fe7ddc796ae86ee627aa9790a4c409ffd
parentccd76982bf51df260c845ad73822589f17c2a2ea
LU-13467 llite: truncate deadlock with DoM files

All MDT intent RPCs are sent with inode mutex locked
while read/write and setattr unlocks inode mutex on entry,
takes LDLM lock and locks inode mutex again and sends the RPC.
So a deadlock can occur since LDLM lock is the same in case of DoM.

In fact read/write and setattr takes lli_trunc_sem, so
inode mutex can be ommited in truncate case.

Replace inode_lock with new lli_setattr_mutex to keep protection
from concurrent setattr time updates.

HPE-bug-id: LUS-8455
Change-Id: Ie294154306cc3b6cff977a2dff485e8d44145ed9
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Vitaly Fertman <c17818@cray.com>
Signed-off-by: Andriy Skulysh <c17819@cray.com>
Reviewed-on: https://review.whamcloud.com/38288
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/vvp_io.c