]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libfrog: advertise exchange-range support
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:01 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:06 +0000 (17:01 -0700)
Report the presence of exchange range for a given filesystem.

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

index 6980d3ffab6968dbd43abba8a558059e11fe2198..71a8e4bb998084ede1488ea15db75c7fea009f17 100644 (file)
@@ -31,6 +31,7 @@ xfs_report_geom(
        int                     bigtime_enabled;
        int                     inobtcount;
        int                     nrext64;
+       int                     exchangerange;
 
        isint = geo->logstart > 0;
        lazycount = geo->flags & XFS_FSOP_GEOM_FLAGS_LAZYSB ? 1 : 0;
@@ -49,12 +50,14 @@ xfs_report_geom(
        bigtime_enabled = geo->flags & XFS_FSOP_GEOM_FLAGS_BIGTIME ? 1 : 0;
        inobtcount = geo->flags & XFS_FSOP_GEOM_FLAGS_INOBTCNT ? 1 : 0;
        nrext64 = geo->flags & XFS_FSOP_GEOM_FLAGS_NREXT64 ? 1 : 0;
+       exchangerange = geo->flags & XFS_FSOP_GEOM_FLAGS_EXCHANGE_RANGE ? 1 : 0;
 
        printf(_(
 "meta-data=%-22s isize=%-6d agcount=%u, agsize=%u blks\n"
 "         =%-22s sectsz=%-5u attr=%u, projid32bit=%u\n"
 "         =%-22s crc=%-8u finobt=%u, sparse=%u, rmapbt=%u\n"
 "         =%-22s reflink=%-4u bigtime=%u inobtcount=%u nrext64=%u\n"
+"         =%-22s exchange=%-3u\n"
 "data     =%-22s bsize=%-6u blocks=%llu, imaxpct=%u\n"
 "         =%-22s sunit=%-6u swidth=%u blks\n"
 "naming   =version %-14u bsize=%-6u ascii-ci=%d, ftype=%d\n"
@@ -65,6 +68,7 @@ xfs_report_geom(
                "", geo->sectsize, attrversion, projid32bit,
                "", crcs_enabled, finobt_enabled, spinodes, rmapbt_enabled,
                "", reflink_enabled, bigtime_enabled, inobtcount, nrext64,
+               "", exchangerange,
                "", geo->blocksize, (unsigned long long)geo->datablocks,
                        geo->imaxpct,
                "", geo->sunit, geo->swidth,