]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_spaceman: report health status of the realtime rmap btree
authorDarrick J. Wong <djwong@kernel.org>
Mon, 24 Feb 2025 18:21:59 +0000 (10:21 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 25 Feb 2025 17:16:00 +0000 (09:16 -0800)
Add reporting of the rt rmap btree health to spaceman.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
spaceman/health.c

index 0d2767df424f270744a08a0aecbbb78076e66235..5774d609a28de3fea43a0a0f81a58df63cec3c60 100644 (file)
@@ -42,6 +42,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);
@@ -146,6 +151,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},
 };