[LU-12800] mdd_is_parent() goes into infinite loop Created: 25/Sep/19  Updated: 09/Oct/19  Resolved: 09/Oct/19

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

Type: Bug Priority: Minor
Reporter: Andriy Skulysh Assignee: Andriy Skulysh
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

mdd_parent_fid() reads xattrs without taking a lock, so the xattr cache can be populated with stale data. So link_ea data forms a cycle :

        osp <struct osp_object 0xffff8800852091e0>
         b'trusted.link' <struct osp_xattr_entry 0xffff880085836d80>
         <struct link_ea_entry 0xffff880085836dde> b'16' [0x2c0000400:0x21:0x0]

         osp <struct osp_object 0xffff880085208420>
         b'trusted.link' <struct osp_xattr_entry 0xffff8801246c1780>
         <struct link_ea_entry 0xffff8801246c17de> b'[0x2c0000400:0x21:0x0]:0' [0x2c0000404:0x720:0x0]

        osp <struct osp_object 0xffff880085209080>
         b'trusted.link' <struct osp_xattr_entry 0xffff880085836700>
         <struct link_ea_entry 0xffff88008583675e> b'8' [0x280000403:0x7:0x0]

        osp <struct osp_object 0xffff8800852082c0>
         b'trusted.link' <struct osp_xattr_entry 0xffff880083db1300>
         <struct link_ea_entry 0xffff880083db135e> b'[0x280000403:0x7:0x0]:3' [0x2c0000409:0x729:0x0]

It is reproduced by racer.



 Comments   
Comment by Gerrit Updater [ 25/Sep/19 ]

Andriy Skulysh (c17819@cray.com) uploaded a new patch: https://review.whamcloud.com/36287
Subject: LU-12800 mdd: do not cache atributes on mdd_parent_fid
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c879733feeb408fe7cc4b37cc9dcce214fedca84

Comment by Gerrit Updater [ 09/Oct/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36287/
Subject: LU-12800 mdd: do not cache atributes on mdd_parent_fid
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a38c587cbf3be2e9870941601f34e355e6dced2f

Comment by Peter Jones [ 09/Oct/19 ]

Landed for 2.13

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