]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_db: dump zoned filesystem superblock fields
authorDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jun 2026 01:04:44 +0000 (18:04 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Tue, 30 Jun 2026 09:50:55 +0000 (11:50 +0200)
Display the rtstart and rtreserved superblock fields if the filesystem
has zoned storage support.

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

diff --git a/db/sb.c b/db/sb.c
index 52ac48d45d5ae63337d9260af4418a712971f7d2..666207145a86cb603c9332f83bca733c1079d090 100644 (file)
--- a/db/sb.c
+++ b/db/sb.c
@@ -63,6 +63,14 @@ metadirfld_count(
        return xfs_has_metadir(mp) ? 1 : 0;
 }
 
+static int
+zonedfld_count(
+       void            *obj,
+       int             startoff)
+{
+       return xfs_has_zoned(mp) ? 1 : 0;
+}
+
 #define        OFF(f)  bitize(offsetof(struct xfs_dsb, sb_ ## f))
 #define        SZC(f)  szcount(struct xfs_dsb, sb_ ## f)
 const field_t  sb_flds[] = {
@@ -136,6 +144,8 @@ const field_t       sb_flds[] = {
                FLD_COUNT, TYP_NONE },
        { "pad", FLDT_UINT8X, OI(OFF(pad)), metadirfld_count,
                FLD_COUNT, TYP_NONE },
+       { "rtstart", FLDT_DRFSBNO, OI(OFF(rtstart)), zonedfld_count, FLD_COUNT, TYP_NONE },
+       { "rtreserved", FLDT_UINT64D, OI(OFF(rtreserved)), zonedfld_count, FLD_COUNT, TYP_NONE },
        { NULL }
 };