From ac50c41c773e7a38637337e74f9c9f9dd25a1f11 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 15 Aug 2024 11:57:38 -0700 Subject: [PATCH] xfs_spaceman: report health status of the realtime rmap btree Add reporting of the rt rmap btree health to spaceman. Signed-off-by: Darrick J. Wong --- spaceman/health.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spaceman/health.c b/spaceman/health.c index 428158932..90e4dfd8c 100644 --- a/spaceman/health.c +++ b/spaceman/health.c @@ -41,6 +41,11 @@ static bool has_reflink(const struct xfs_fsop_geom *g) return g->flags & XFS_FSOP_GEOM_FLAGS_REFLINK; } +static bool has_rtrmapbt(const struct xfs_fsop_geom *g) +{ + return g->rtblocks > 0 && (g->flags & XFS_FSOP_GEOM_FLAGS_RMAPBT); +} + struct flag_map { unsigned int mask; bool (*has_fn)(const struct xfs_fsop_geom *g); @@ -145,6 +150,11 @@ static const struct flag_map rtgroup_flags[] = { .mask = XFS_RTGROUP_GEOM_SICK_SUMMARY, .descr = "realtime summary", }, + { + .mask = XFS_RTGROUP_GEOM_SICK_RMAPBT, + .descr = "realtime reverse mappings btree", + .has_fn = has_rtrmapbt, + }, {0}, }; -- 2.50.1