summaryrefslogtreecommitdiff
path: root/fs/xfs/Makefile
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-14 11:06:15 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-10-14 14:16:41 -0700
commit7d880b30b1c8a1b3f9ee89e04a23400cac839d40 (patch)
treeb57f2a6a31be0b053c9a80b2883fd09522344aa9 /fs/xfs/Makefile
parentd238a4dcc17fb06fa121eb7f1531bf3eac45754e (diff)
xfs: implement live inode scan for scrub
This patch implements a live file scanner for online fsck functions that require the ability to walk a filesystem to gather metadata records and stay informed about metadata changes to files that have already been visited. The iscan structure consists of two inode number cursors: one to track which inode we want to visit next, and a second one to track which inodes have already been visited. This second cursor is key to capturing live updates to files previously scanned while the main thread continues scanning -- any inode greater than this value hasn't been scanned and can go on its way; any other update must be incorporated into the collected data. It is critical for the scanning thraad to hold exclusive access on the inode until after marking the inode visited. This new code is split out as a separate patch from its initial user for the sake of enabling the author to move patches around his tree with ease. The intended usage model for this code is roughly: xchk_iscan_start(iscan, 0, 0); while ((error = xchk_iscan_iter(sc, iscan, &ip)) == 1) { xfs_ilock(ip, ...); /* capture inode metadata */ xchk_iscan_mark_visited(iscan, ip); xfs_iunlock(ip, ...); xfs_irele(ip); } xchk_iscan_stop(iscan); if (error) return error; Hook functions for live updates can then do: if (xchk_iscan_want_live_update(...)) /* update the captured inode metadata */ Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/Makefile')
-rw-r--r--fs/xfs/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/Makefile b/fs/xfs/Makefile
index 311762ecd1f1..bef67015a099 100644
--- a/fs/xfs/Makefile
+++ b/fs/xfs/Makefile
@@ -169,7 +169,10 @@ xfs-$(CONFIG_XFS_RT) += $(addprefix scrub/, \
rtsummary.o \
)
-xfs-$(CONFIG_XFS_QUOTA) += scrub/quota.o
+xfs-$(CONFIG_XFS_QUOTA) += $(addprefix scrub/, \
+ iscan.o \
+ quota.o \
+ )
# online repair
ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y)