[LU-8353] mdt unlink should lock parent before lookup child Created: 30/Jun/16  Updated: 28/Jul/16  Due: 15/Jul/16  Resolved: 13/Jul/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Critical
Reporter: Lai Siyao Assignee: Lai Siyao
Resolution: Fixed Votes: 0
Labels: dne2

Issue Links:
Related
is related to LU-7117 replay-single test_70d: timeout and m... Resolved
is related to LU-6844 replay-single test 70b failure: 'rund... Resolved
Epic/Theme: dne2
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In DNE Commit-on-Sharing implementation, mdt_reint_unlink() changed code to lookup child before lock parent, as is to find whether current operation is distributed, if so it needs to trigger commit of local changes to eliminate dependencies. But this may cause stale child used in later code. We should always follow lock-before-lookup semantic.



 Comments   
Comment by Gerrit Updater [ 30/Jun/16 ]

Lai Siyao (lai.siyao@intel.com) uploaded a new patch: http://review.whamcloud.com/21088
Subject: LU-8353 mdt: mdt unlink should lock before lookup
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: cd90c77d1216c988126c86ec09de1b9242ab96e7

Comment by Gerrit Updater [ 11/Jul/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/21088/
Subject: LU-8353 mdt: mdt unlink should lock before lookup
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5e5dabac9eca8bc6ea516fb3ad53b8d74fe80a37

Comment by Andreas Dilger [ 13/Jul/16 ]

Should this ticket be closed? Is it related to LU-7117 and should be linked there, or is this unrelated?

Comment by Alex Zhuravlev [ 13/Jul/16 ]

I think it's one of the root causes for LU-7117, but it can pop up w/o 7117, w/o any recovery. basically we were doing lookups w/o LDLM lock and that can result in a corrupted namespace if another "unlink+create" can win race.

Comment by Joseph Gmitter (Inactive) [ 13/Jul/16 ]

Patch landed to master for 2.9.0

Generated at Sat Feb 10 02:16:48 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.