[PATCH 03/27] libfrog: enable scrubbing of the realtime rmap

Darrick J. Wong
2025-02-06T22:50:31Z

Add a new entry so that we can scrub the rtrmapbt and its metadata
directory tree path too.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
libfrog/scrub.c | 10 ++++++++++
scrub/repair.c | 1 +
2 files changed, 11 insertions(+)

diff --git a/libfrog/scrub.c b/libfrog/scrub.c
index 129f592e108ae1..11d467666d6b5a 100644
--- a/libfrog/scrub.c
+++ b/libfrog/scrub.c
@@ -164,6 +164,11 @@ const struct xfrog_scrub_descr xfrog_scrubbers[XFS_SCRUB_TYPE_NR] = {
.descr = "realtime group superblock",
.group = XFROG_SCRUB_GROUP_RTGROUP,
},
+ [XFS_SCRUB_TYPE_RTRMAPBT] = {
+ .name = "rtrmapbt",
+ .descr = "realtime reverse mapping btree",
+ .group = XFROG_SCRUB_GROUP_RTGROUP,
+ },
};

const struct xfrog_scrub_descr xfrog_metapaths[XFS_SCRUB_METAPATH_NR] = {
@@ -207,6 +212,11 @@ const struct xfrog_scrub_descr xfrog_metapaths[XFS_SCRUB_METAPATH_NR] = {
.descr = "project quota file",
.group = XFROG_SCRUB_GROUP_FS,
},
+ [XFS_SCRUB_METAPATH_RTRMAPBT] = {
+ .name = "rtrmapbt",
+ .descr = "rtgroup rmap btree",
+ .group = XFROG_SCRUB_GROUP_RTGROUP,
+ },
};

/* Invoke the scrub ioctl. Returns zero or negative error code. */
diff --git a/scrub/repair.c b/scrub/repair.c
index c8cdb98de5457b..e6906cbd37d0b3 100644
--- a/scrub/repair.c
+++ b/scrub/repair.c
@@ -533,6 +533,7 @@ repair_item_difficulty(

switch (scrub_type) {
case XFS_SCRUB_TYPE_RMAPBT:
+ case XFS_SCRUB_TYPE_RTRMAPBT:
ret |= REPAIR_DIFFICULTY_SECONDARY;
break;