summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/trace.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-22 23:30:58 +0300
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 23:30:58 +0300
commitf1184081ac97625d30c59851944f4c59ae7ddc2b (patch)
tree1995030ec381aaeea65e35ca27f9289b7a9831b1 /fs/xfs/scrub/trace.c
parent93687ee2e3748a4a6b541ff0d83d1480815b00a9 (diff)
downloadlinux-f1184081ac97625d30c59851944f4c59ae7ddc2b.tar.xz
xfs: teach scrub to check file nlinks
Create the necessary scrub code to walk the filesystem's directory tree so that we can compute file link counts. Similar to quotacheck, we create an incore shadow array of link count information and then we walk the filesystem a second time to compare the link counts. We need live updates to keep the information up to date during the lengthy scan, so this scrubber remains disabled until the next patch. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub/trace.c')
-rw-r--r--fs/xfs/scrub/trace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/scrub/trace.c b/fs/xfs/scrub/trace.c
index 5ed75cc33b92..2d5a330afe10 100644
--- a/fs/xfs/scrub/trace.c
+++ b/fs/xfs/scrub/trace.c
@@ -17,11 +17,13 @@
#include "xfs_quota.h"
#include "xfs_quota_defs.h"
#include "xfs_da_format.h"
+#include "xfs_dir2.h"
#include "scrub/scrub.h"
#include "scrub/xfile.h"
#include "scrub/xfarray.h"
#include "scrub/quota.h"
#include "scrub/iscan.h"
+#include "scrub/nlinks.h"
/* Figure out which block the btree cursor was pointing to. */
static inline xfs_fsblock_t