Whamcloud - gitweb
LU-5144 mdt: rename vs link deadlock 18/10918/6
authorRahul Deshmukh <rahul_deshmukh@xyratex.com>
Sat, 30 Aug 2014 00:21:59 +0000 (17:21 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 2 Oct 2014 04:17:29 +0000 (04:17 +0000)
commitf3fedc4c816777e9ff65ca9b423c33c0920d2dd6
tree41e2f894fd889df3165e144e0645037390ac9deb
parent8cae3403835b91634e70e1d138bf8448c1ad2a39
LU-5144 mdt: rename vs link deadlock

it may happen that tgt child for rename is a directory, which is used
as tgt dir for link in parallel, as the result rename locks src child,
tgt child what may deadlock with tgt dir, src file locking of link.

As not dir cannot replace dir, check it before locking the tgt child.

Lustre-commit: b2c2cfc24fa461b3e54cd204a697eeee9a89d49c
Lustre-change: http://review.whamcloud.com/10570/

Test-Parameters: alwaysuploadlogs \
envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=55 \
ossjob=lustre-b2_4 mdsjob=lustre-b2_4 ossbuildno=73 mdsbuildno=73 \
testlist=sanityn

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Signed-off-by: Rahul Deshmukh <rahul_deshmukh@xyratex.com>
Change-Id: I09e96b132d9069d4818e8dc2628c903eff38e53d
Reviewed-on: http://review.whamcloud.com/10918
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_reint.c
lustre/tests/sanityn.sh