]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libfrog: report parent pointers to userspace
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:20 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:11 +0000 (17:01 -0700)
Report the presence of parent pointer to userspace.

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

index 71a8e4bb998084ede1488ea15db75c7fea009f17..597c38b11402505b5eca198bb22e01f80f70f6fc 100644 (file)
@@ -32,6 +32,7 @@ xfs_report_geom(
        int                     inobtcount;
        int                     nrext64;
        int                     exchangerange;
+       int                     parent;
 
        isint = geo->logstart > 0;
        lazycount = geo->flags & XFS_FSOP_GEOM_FLAGS_LAZYSB ? 1 : 0;
@@ -51,6 +52,7 @@ xfs_report_geom(
        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;
+       parent = geo->flags & XFS_FSOP_GEOM_FLAGS_PARENT ? 1 : 0;
 
        printf(_(
 "meta-data=%-22s isize=%-6d agcount=%u, agsize=%u blks\n"
@@ -60,7 +62,7 @@ xfs_report_geom(
 "         =%-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"
+"naming   =version %-14u bsize=%-6u ascii-ci=%d, ftype=%d, parent=%d\n"
 "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"),
@@ -72,7 +74,7 @@ xfs_report_geom(
                "", geo->blocksize, (unsigned long long)geo->datablocks,
                        geo->imaxpct,
                "", geo->sunit, geo->swidth,
-               dirversion, geo->dirblocksize, cimode, ftype_enabled,
+               dirversion, geo->dirblocksize, cimode, ftype_enabled, parent,
                isint ? _("internal log") : logname ? logname : _("external"),
                        geo->blocksize, geo->logblocks, logversion,
                "", geo->logsectsize, geo->logsunit / geo->blocksize, lazycount,