Skip to content
Snippets Groups Projects
Commit 2131e4ed authored by Lai Siyao's avatar Lai Siyao Committed by Oleg Drokin
Browse files

LU-11104 mdt: rename may cause deadlock


In rename locking, there are two situations we need to lock target
parent before source parent:
1. source parent is subdir of target parent.
2. source and target parents are both stripes of the same directory,
   and stripe index of source parent is after that of target parent.

But the check for the second situation is missing, which may cause
deadlock if another thread is taking stripe locks of their parent.

Cleanup mdd_is_subdir().

Add sanityn.sh test_81b.

Signed-off-by: default avatarLai Siyao <lai.siyao@intel.com>
Change-Id: Ib96fb7b286e7dfdea868ef2fa4919f8d3f1567f9
Reviewed-on: https://review.whamcloud.com/32701


Reviewed-by: default avatarAndreas Dilger <adilger@whamcloud.com>
Reviewed-by: default avatarMike Pershin <mpershin@whamcloud.com>
Tested-by: Jenkins
Tested-by: default avatarMaloo <hpdd-maloo@intel.com>
Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
parent 954cc675
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment