From: Darrick J. Wong Date: Tue, 30 Jun 2026 01:04:44 +0000 (-0700) Subject: xfs_db: dump zoned filesystem superblock fields X-Git-Tag: v7.1.0~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1bbedb6d165e79d732616249b946fddf4ef385fd;p=xfsprogs-dev.git xfs_db: dump zoned filesystem superblock fields Display the rtstart and rtreserved superblock fields if the filesystem has zoned storage support. Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- diff --git a/db/sb.c b/db/sb.c index 52ac48d4..66620714 100644 --- 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 } };