[LU-14365] ROOT LMA scrub Created: 26/Jan/21  Updated: 27/Jan/21

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Lai Siyao Assignee: Lai Siyao
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by LU-14367 ROOT LMA scrub Resolved
is duplicated by LU-14368 ROOT LMA scrub Resolved
is duplicated by LU-14369 ROOT LMA scrub Resolved
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

LFSCK always trust FID in LMA more than FID in directory entry and FID in linkea, but it may be corrupt, or it's an IGIF(upgraded from 1.8), while the FID in child's link}}EA or "{{.." FID is the correct FID. Currently such inconsistency can only be fixed manually, however for special objects like ROOT, it should be able to be repaird automatically. This can be achieved by checking special object LMA during the early mount-time scan, and checking if the subdirectories under ROOT/ have a trusted.link entry matching fid_is_root(), or all have the same ".." FID, in which case the LMA FID is wrong (probably an IGIF FID) and should be fixed to use [FID_SEQ_ROOT:FID_OID_ROOT:0x0], rather than the IGIF FID.



 Comments   
Comment by Andreas Dilger [ 26/Jan/21 ]

Note, in addition to the fix you described here, it may also be possible to avoid the problem of an IGIF FID in the first place if OI Scrub checks a child directory for its ".." FID and uses that instead of generating an IGIF FID if it finds a directory without any lma xattr.

Comment by Gerrit Updater [ 27/Jan/21 ]

Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41329
Subject: LU-14365 mdt: lfs mkdir should return -EEXIST if exists
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 50dc0eacf35fab67bed33b6adcb586fb29f796ce

Generated at Sat Feb 10 03:09:06 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.