]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_growfs: report the presence of the reflink feature
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Oct 2016 22:14:32 +0000 (15:14 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 26 Oct 2016 18:14:21 +0000 (11:14 -0700)
Report the presence of the reflink feature in xfs_info.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
growfs/xfs_growfs.c

index 2b464802320fbe36c54c4a6f6d0b7c9a541b6b7f..a294e144caf275a0e8cf0b539f46b1663964c8e7 100644 (file)
@@ -59,12 +59,14 @@ report_info(
        int             ftype_enabled,
        int             finobt_enabled,
        int             spinodes,
-       int             rmapbt_enabled)
+       int             rmapbt_enabled,
+       int             reflink_enabled)
 {
        printf(_(
            "meta-data=%-22s isize=%-6u agcount=%u, agsize=%u blks\n"
            "         =%-22s sectsz=%-5u attr=%u, projid32bit=%u\n"
            "         =%-22s crc=%-8u finobt=%u spinodes=%u rmapbt=%u\n"
+           "         =%-22s reflink=%u\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"
@@ -75,6 +77,7 @@ report_info(
                mntpoint, geo.inodesize, geo.agcount, geo.agblocks,
                "", geo.sectsize, attrversion, projid32bit,
                "", crcs_enabled, finobt_enabled, spinodes, rmapbt_enabled,
+               "", reflink_enabled,
                "", geo.blocksize, (unsigned long long)geo.datablocks,
                        geo.imaxpct,
                "", geo.sunit, geo.swidth,
@@ -129,6 +132,7 @@ main(int argc, char **argv)
        int                     finobt_enabled; /* free inode btree */
        int                     spinodes;
        int                     rmapbt_enabled;
+       int                     reflink_enabled;
 
        progname = basename(argv[0]);
        setlocale(LC_ALL, "");
@@ -253,12 +257,13 @@ main(int argc, char **argv)
        finobt_enabled = geo.flags & XFS_FSOP_GEOM_FLAGS_FINOBT ? 1 : 0;
        spinodes = geo.flags & XFS_FSOP_GEOM_FLAGS_SPINODES ? 1 : 0;
        rmapbt_enabled = geo.flags & XFS_FSOP_GEOM_FLAGS_RMAPBT ? 1 : 0;
+       reflink_enabled = geo.flags & XFS_FSOP_GEOM_FLAGS_REFLINK ? 1 : 0;
        if (nflag) {
                report_info(geo, datadev, isint, logdev, rtdev,
                                lazycount, dirversion, logversion,
                                attrversion, projid32bit, crcs_enabled, ci,
                                ftype_enabled, finobt_enabled, spinodes,
-                               rmapbt_enabled);
+                               rmapbt_enabled, reflink_enabled);
                exit(0);
        }
 
@@ -296,7 +301,8 @@ main(int argc, char **argv)
        report_info(geo, datadev, isint, logdev, rtdev,
                        lazycount, dirversion, logversion,
                        attrversion, projid32bit, crcs_enabled, ci, ftype_enabled,
-                       finobt_enabled, spinodes, rmapbt_enabled);
+                       finobt_enabled, spinodes, rmapbt_enabled,
+                       reflink_enabled);
 
        ddsize = xi.dsize;
        dlsize = ( xi.logBBsize? xi.logBBsize :