Whamcloud - gitweb
LU-5144 mdt: rename vs link deadlock 70/10570/4
authorVitaly Fertman <vitaly_fertman@xyratex.com>
Tue, 3 Jun 2014 10:58:13 +0000 (14:58 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 16 Jun 2014 01:53:53 +0000 (01:53 +0000)
commitb2c2cfc24fa461b3e54cd204a697eeee9a89d49c
tree53ab41e1e34db6fe44b69602a2b7022a3bc8b925
parent8d5344f3e4e2e055acbe0d6179abaf1811672557
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.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-1921
Change-Id: If8b91d27e4d978853e4b8fbb025667d22c9d2f02
Reviewed-on: http://review.whamcloud.com/10570
Tested-by: Jenkins
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_reint.c
lustre/tests/sanityn.sh