]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_spaceman: report health status of the realtime rmap btree
authorDarrick J. Wong <djwong@kernel.org>
Fri, 9 Aug 2024 12:17:15 +0000 (14:17 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 12 Aug 2024 11:53:50 +0000 (13:53 +0200)
Add reporting of the rt rmap btree health to spaceman.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
spaceman/health.c

index 4281589324cd4446c8a3708dcb1b5cb960ac3191..90e4dfd8c284870d251dca0f04cf0c1def7b1f3a 100644 (file)
@@ -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},
 };