summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/scrub.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-08-18 15:40:05 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-11-09 19:07:59 -0800
commitfb7c029fd084205c511cd2b1cf2d44f525f727c9 (patch)
treeebfa698b7cd0cd46c8dbaccfc62305c5f107b411 /fs/xfs/scrub/scrub.c
parenta77db85b442f185dc3dcb5290c905266b449ee3c (diff)
xfs: scrub each rtgroup's portion of the rtbitmap separately
Create a new scrub type code so that userspace can scrub each rtgroup's portion of the rtbitmap file separately. This reduces the long tail latency that results from scanning the entire bitmap all at once, and prepares us for future patchsets, wherein we'll need to be able to lock a specific rtgroup so that we can rebuild that rtgroup's part of the rtbitmap contents from the rtgroup's rmap btree. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/scrub.c')
-rw-r--r--fs/xfs/scrub/scrub.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c
index 5e07150e8f14..6066673953cb 100644
--- a/fs/xfs/scrub/scrub.c
+++ b/fs/xfs/scrub/scrub.c
@@ -416,6 +416,13 @@ static const struct xchk_meta_ops meta_scrub_ops[] = {
.has = xfs_has_rtgroups,
.repair = xrep_rgsuperblock,
},
+ [XFS_SCRUB_TYPE_RGBITMAP] = { /* realtime group bitmap */
+ .type = ST_RTGROUP,
+ .setup = xchk_setup_rgbitmap,
+ .scrub = xchk_rgbitmap,
+ .has = xfs_has_rtgroups,
+ .repair = xrep_notsupported,
+ },
};
static int