diff mbox series

[12/27] xfs_spaceman: report health status of the realtime rmap btree

Message ID 173888088279.2741033.5703668513120399965.stgit@frogsfrogsfrogs (mailing list archive)
State Not Applicable, archived
Headers show
Series [01/27] libxfs: compute the rt rmap btree maxlevels during initialization | expand

Commit Message

Darrick J. Wong Feb. 6, 2025, 10:52 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Add reporting of the rt rmap btree health to spaceman.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 spaceman/health.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Christoph Hellwig Feb. 7, 2025, 5:19 a.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/spaceman/health.c b/spaceman/health.c
index 0d2767df424f27..5774d609a28de3 100644
--- a/spaceman/health.c
+++ b/spaceman/health.c
@@ -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},
 };