summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/common.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-22 21:30:59 +0100
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 21:30:59 +0100
commit86a1746eea91c6db983e6ccd3f846708746e47c2 (patch)
treef87d26a712713a787e7c9e058f150d5dc5194b3f /fs/xfs/scrub/common.c
parentxfs: teach scrub to check file nlinks (diff)
downloadlinux-86a1746eea91c6db983e6ccd3f846708746e47c2.tar.xz
linux-86a1746eea91c6db983e6ccd3f846708746e47c2.zip
xfs: track directory entry updates during live nlinks fsck
Create the necessary hooks in the directory operations (create/link/unlink/rename) code so that our live nlink scrub code can stay up to date with link count updates in the rest of the filesystem. This will be the means to keep our shadow link count information up to date while the scan runs in real time. In online fsck part 2, we'll use these same hooks to handle repairs to directories and parent pointer information. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub/common.c')
-rw-r--r--fs/xfs/scrub/common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c
index c5a6c47d3df2..699092195f41 100644
--- a/fs/xfs/scrub/common.c
+++ b/fs/xfs/scrub/common.c
@@ -1302,6 +1302,9 @@ xchk_fsgates_enable(
if (scrub_fsgates & XCHK_FSGATES_QUOTA)
xfs_dqtrx_hook_enable();
+ if (scrub_fsgates & XCHK_FSGATES_DIRENTS)
+ xfs_dir_hook_enable();
+
sc->flags |= scrub_fsgates;
}