xfs_spaceman: report health of the realtime refcount btree
authorDarrick J. Wong <djwong@kernel.org>
Thu, 15 Aug 2024 18:58:29 +0000 (11:58 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 16 Aug 2024 21:57:44 +0000 (14:57 -0700)
Report the health of the realtime reference count btree.

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

index 90e4dfd8c284870d251dca0f04cf0c1def7b1f3a..786463a0ffc09ae3cc2800dea59abc99091dc6c8 100644 (file)
@@ -46,6 +46,11 @@ static bool has_rtrmapbt(const struct xfs_fsop_geom *g)
        return g->rtblocks > 0 && (g->flags & XFS_FSOP_GEOM_FLAGS_RMAPBT);
 }
 
+static bool has_rtreflink(const struct xfs_fsop_geom *g)
+{
+       return g->rtblocks > 0 && (g->flags & XFS_FSOP_GEOM_FLAGS_REFLINK);
+}
+
 struct flag_map {
        unsigned int            mask;
        bool                    (*has_fn)(const struct xfs_fsop_geom *g);
@@ -155,6 +160,11 @@ static const struct flag_map rtgroup_flags[] = {
                .descr = "realtime reverse mappings btree",
                .has_fn = has_rtrmapbt,
        },
+       {
+               .mask = XFS_RTGROUP_GEOM_SICK_REFCNTBT,
+               .descr = "realtime reference count btree",
+               .has_fn = has_rtreflink,
+       },
        {0},
 };