[LU-11148] dir migration may deadlock in link locking Created: 16/Jul/18  Updated: 02/Apr/19  Due: 16/Aug/18  Resolved: 06/Aug/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.0, Lustre 2.11.0
Fix Version/s: Lustre 2.12.0

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

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

https://review.whamcloud.com/#/c/25262 introduced trybits in IBITS lock, but it doesn't enable trybits for PDO lock in mdt_object_local_lock(), which may cause deadlock, and it is observed in test.



 Comments   
Comment by Gerrit Updater [ 16/Jul/18 ]

Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/32820
Subject: LU-11148 ldlm: enable trybits for PDO lock
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 16658cf99c739874ad0003025ec0e049306a0948

Comment by Mikhail Pershin [ 17/Jul/18 ]

Lai, I don't remember that trybits are being used for PDO locks, could you point to the related code which require such changes?

Comment by Lai Siyao [ 17/Jul/18 ]

Mike, it's in dir migration code: mdt_lock_objects_in_linkea() -> mdt_reint_object_lock_try().

Comment by Mikhail Pershin [ 17/Jul/18 ]

ah, that one. Does the patch solve the problem?

Comment by Lai Siyao [ 18/Jul/18 ]

Yes, it looks working, I tested with racer.sh, and haven't seen this deadlock for a few rounds.

Comment by Gerrit Updater [ 06/Aug/18 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32820/
Subject: LU-11148 ldlm: enable trybits for PDO lock
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: fb6430906ae4fd9c7329944cd89dd4c493be1179

Comment by Peter Jones [ 06/Aug/18 ]

Landed for 2.12

Comment by Gerrit Updater [ 02/Apr/19 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34570
Subject: LU-11148 mdt: make mdt_object locking consitent
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: be3d3ce3a8f54d259b267b3f1ffbb1c77c0a910a

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