Whamcloud - gitweb
LU-18195 osd-ldiskfs: use IGET_NO_CHECKS for objects under lost+found 76/56276/3
authorLi Dongyang <dongyangli@ddn.com>
Fri, 6 Sep 2024 11:20:24 +0000 (21:20 +1000)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Sep 2024 15:11:55 +0000 (15:11 +0000)
commit1045c6433c50055c58c1bbdab10a1d447cdb00c2
tree5f0b31e87b40f30244181f43e2bbd6a806d90655
parentaa636f8ae6883cef018b859bba70140df9a826c4
LU-18195 osd-ldiskfs: use IGET_NO_CHECKS for objects under lost+found

With e2fsck older than v1.47.1-rc2-10-g849a9e6e1,
e2fsck could link ea inode under lost+found, and this
creates problems on kernels enforce ea_inode flag checks.

Check for lost+found fid and use NO_CHECKS flag
in the lfsck code path.

Add s_lpf_ino in sbi, and set it by find the lost+found
entry during ext4_fill_super().
In ext4_lookup, check if the parent is the lost+found dir.
Note lost+found won't be changed when target mounted as
lustre, so we only lookup once during mount and don't
monitor lost+found entry. Even if it's changed duing e2fsck
or mounted as ldiskfs, we could still detect at next mount.

Test-Parameters: trivial
Test-Parameters: fstype=ldiskfs serverdistro=el9.4 testlist=conf-sanity env=ONLY=61b
Change-Id: I95492fcc2f0ec4188dfb92b1dc1aa6055cab6ca8
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56276
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ldiskfs/kernel_patches/patches/rhel9.4/ext4-add-IGET_NO_CHECKS-flag.patch
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_scrub.c