diff mbox series

[26/45] libfrog: report the zoned flag

Message ID 20250409075557.3535745-27-hch@lst.de (mailing list archive)
State New
Headers show
Series [01/45] xfs: generalize the freespace and reserved blocks handling | expand

Commit Message

Christoph Hellwig April 9, 2025, 7:55 a.m. UTC
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 libfrog/fsgeom.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Darrick J. Wong April 9, 2025, 3:58 p.m. UTC | #1
On Wed, Apr 09, 2025 at 09:55:29AM +0200, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>

I wonder why the other xfs_report_geom change (about the realtime device
name reporting) wasn't in this patch?

Anyway the changes here seem reasonable to me, so
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  libfrog/fsgeom.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/libfrog/fsgeom.c b/libfrog/fsgeom.c
> index 13df88ae43a7..5c4ba29ca9ac 100644
> --- a/libfrog/fsgeom.c
> +++ b/libfrog/fsgeom.c
> @@ -34,6 +34,7 @@ xfs_report_geom(
>  	int			exchangerange;
>  	int			parent;
>  	int			metadir;
> +	int			zoned;
>  
>  	isint = geo->logstart > 0;
>  	lazycount = geo->flags & XFS_FSOP_GEOM_FLAGS_LAZYSB ? 1 : 0;
> @@ -55,6 +56,7 @@ xfs_report_geom(
>  	exchangerange = geo->flags & XFS_FSOP_GEOM_FLAGS_EXCHANGE_RANGE ? 1 : 0;
>  	parent = geo->flags & XFS_FSOP_GEOM_FLAGS_PARENT ? 1 : 0;
>  	metadir = geo->flags & XFS_FSOP_GEOM_FLAGS_METADIR ? 1 : 0;
> +	zoned = geo->flags & XFS_FSOP_GEOM_FLAGS_ZONED ? 1 : 0;
>  
>  	printf(_(
>  "meta-data=%-22s isize=%-6d agcount=%u, agsize=%u blks\n"
> @@ -68,7 +70,7 @@ xfs_report_geom(
>  "log      =%-22s bsize=%-6d blocks=%u, version=%d\n"
>  "         =%-22s sectsz=%-5u sunit=%d blks, lazy-count=%d\n"
>  "realtime =%-22s extsz=%-6d blocks=%lld, rtextents=%lld\n"
> -"         =%-22s rgcount=%-4d rgsize=%u extents\n"),
> +"         =%-22s rgcount=%-4d rgsize=%u extents, zoned=%d\n"),
>  		mntpoint, geo->inodesize, geo->agcount, geo->agblocks,
>  		"", geo->sectsize, attrversion, projid32bit,
>  		"", crcs_enabled, finobt_enabled, spinodes, rmapbt_enabled,
> @@ -84,7 +86,7 @@ xfs_report_geom(
>  		!geo->rtblocks ? _("none") : rtname ? rtname : _("internal"),
>  		geo->rtextsize * geo->blocksize, (unsigned long long)geo->rtblocks,
>  			(unsigned long long)geo->rtextents,
> -		"", geo->rgcount, geo->rgextents);
> +		"", geo->rgcount, geo->rgextents, zoned);
>  }
>  
>  /* Try to obtain the xfs geometry.  On error returns a negative error code. */
> -- 
> 2.47.2
> 
>
Christoph Hellwig April 10, 2025, 6:14 a.m. UTC | #2
On Wed, Apr 09, 2025 at 08:58:46AM -0700, Darrick J. Wong wrote:
> On Wed, Apr 09, 2025 at 09:55:29AM +0200, Christoph Hellwig wrote:
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> I wonder why the other xfs_report_geom change (about the realtime device
> name reporting) wasn't in this patch?

Good question.  I gave it a quick try and it seems to work out much
better indeed and also solve the rtstart issue mentioned earlier.
Darrick J. Wong April 10, 2025, 4:36 p.m. UTC | #3
On Thu, Apr 10, 2025 at 08:14:24AM +0200, Christoph Hellwig wrote:
> On Wed, Apr 09, 2025 at 08:58:46AM -0700, Darrick J. Wong wrote:
> > On Wed, Apr 09, 2025 at 09:55:29AM +0200, Christoph Hellwig wrote:
> > > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > 
> > I wonder why the other xfs_report_geom change (about the realtime device
> > name reporting) wasn't in this patch?
> 
> Good question.  I gave it a quick try and it seems to work out much
> better indeed and also solve the rtstart issue mentioned earlier.

<nod> I usually try to keep the FIXUP changes to the bare minimum that
makes compilation work again, and push everything else until after the
libxfs rebase part.  It sort of kept things sane.

--D
diff mbox series

Patch

diff --git a/libfrog/fsgeom.c b/libfrog/fsgeom.c
index 13df88ae43a7..5c4ba29ca9ac 100644
--- a/libfrog/fsgeom.c
+++ b/libfrog/fsgeom.c
@@ -34,6 +34,7 @@  xfs_report_geom(
 	int			exchangerange;
 	int			parent;
 	int			metadir;
+	int			zoned;
 
 	isint = geo->logstart > 0;
 	lazycount = geo->flags & XFS_FSOP_GEOM_FLAGS_LAZYSB ? 1 : 0;
@@ -55,6 +56,7 @@  xfs_report_geom(
 	exchangerange = geo->flags & XFS_FSOP_GEOM_FLAGS_EXCHANGE_RANGE ? 1 : 0;
 	parent = geo->flags & XFS_FSOP_GEOM_FLAGS_PARENT ? 1 : 0;
 	metadir = geo->flags & XFS_FSOP_GEOM_FLAGS_METADIR ? 1 : 0;
+	zoned = geo->flags & XFS_FSOP_GEOM_FLAGS_ZONED ? 1 : 0;
 
 	printf(_(
 "meta-data=%-22s isize=%-6d agcount=%u, agsize=%u blks\n"
@@ -68,7 +70,7 @@  xfs_report_geom(
 "log      =%-22s bsize=%-6d blocks=%u, version=%d\n"
 "         =%-22s sectsz=%-5u sunit=%d blks, lazy-count=%d\n"
 "realtime =%-22s extsz=%-6d blocks=%lld, rtextents=%lld\n"
-"         =%-22s rgcount=%-4d rgsize=%u extents\n"),
+"         =%-22s rgcount=%-4d rgsize=%u extents, zoned=%d\n"),
 		mntpoint, geo->inodesize, geo->agcount, geo->agblocks,
 		"", geo->sectsize, attrversion, projid32bit,
 		"", crcs_enabled, finobt_enabled, spinodes, rmapbt_enabled,
@@ -84,7 +86,7 @@  xfs_report_geom(
 		!geo->rtblocks ? _("none") : rtname ? rtname : _("internal"),
 		geo->rtextsize * geo->blocksize, (unsigned long long)geo->rtblocks,
 			(unsigned long long)geo->rtextents,
-		"", geo->rgcount, geo->rgextents);
+		"", geo->rgcount, geo->rgextents, zoned);
 }
 
 /* Try to obtain the xfs geometry.  On error returns a negative error code. */