[LU-9543] Deadlock in ofd fiemap code leads to client eviction Created: 22/May/17  Updated: 10/Jan/19  Resolved: 04/Jan/18

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

Type: Bug Priority: Minor
Reporter: Andriy Skulysh Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Duplicate
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When fiemap is used with FIEMAP_FLAG_SYNC flag OST locks all spare regions one by one. It may lead to a deadlock with another client which tries to get write lock on a region covering 2 spare regions.
So scenario is following :
1) client 1 calls fiemap, OST locks first spare region
2) client 2 enqueues PW lock on whole file, it conflicts with first spare region
3) OST tries to lock second spare region, but it conflicts with PW waiting lock.



 Comments   
Comment by Gerrit Updater [ 22/May/17 ]

Andriy Skulysh (andriy.skulysh@seagate.com) uploaded a new patch: https://review.whamcloud.com/27224
Subject: LU-9543 ofd: fiemap deadlock
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 4e95ce002d560ac28badcb11c6e05dfdf1b63d01

Comment by Gerrit Updater [ 04/Jan/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/27224/
Subject: LU-9543 ofd: fiemap deadlock
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4eac5c85d3a4ddda5833af2f15cd8d614d1e3996

Comment by Peter Jones [ 04/Jan/18 ]

Landed for 2.11

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