xfs: track directory entry updates during live nlinks fsck
authorDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:30:59 +0000 (12:30 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:30:59 +0000 (12:30 -0800)
commit86a1746eea91c6db983e6ccd3f846708746e47c2
treef87d26a712713a787e7c9e058f150d5dc5194b3f
parentf1184081ac97625d30c59851944f4c59ae7ddc2b
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>
fs/xfs/scrub/common.c
fs/xfs/scrub/nlinks.c
fs/xfs/scrub/nlinks.h
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h
fs/xfs/scrub/trace.h
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_mount.h
fs/xfs/xfs_super.c
fs/xfs/xfs_symlink.c