xfs
[Top] [All Lists]

[PATCH v4 19/20] xfsprogs/growfs: report finobt status in fs geometry (x

To: xfs@xxxxxxxxxxx
Subject: [PATCH v4 19/20] xfsprogs/growfs: report finobt status in fs geometry (xfs_info)
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Wed, 7 May 2014 08:21:58 -0400
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1399465319-65066-1-git-send-email-bfoster@xxxxxxxxxx>
References: <1399465319-65066-1-git-send-email-bfoster@xxxxxxxxxx>
Check and report on the free inode btree status bit in the fs
geometry.

Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 growfs/xfs_growfs.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/growfs/xfs_growfs.c b/growfs/xfs_growfs.c
index 77da707..8e611b6 100644
--- a/growfs/xfs_growfs.c
+++ b/growfs/xfs_growfs.c
@@ -56,12 +56,13 @@ report_info(
        int             projid32bit,
        int             crcs_enabled,
        int             cimode,
-       int             ftype_enabled)
+       int             ftype_enabled,
+       int             finobt_enabled)
 {
        printf(_(
            "meta-data=%-22s isize=%-6u agcount=%u, agsize=%u blks\n"
            "         =%-22s sectsz=%-5u attr=%u, projid32bit=%u\n"
-           "         =%-22s crc=%u\n"
+           "         =%-22s crc=%-8u finobt=%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"
@@ -71,7 +72,7 @@ report_info(
 
                mntpoint, geo.inodesize, geo.agcount, geo.agblocks,
                "", geo.sectsize, attrversion, projid32bit,
-               "", crcs_enabled,
+               "", crcs_enabled, finobt_enabled,
                "", geo.blocksize, (unsigned long long)geo.datablocks,
                        geo.imaxpct,
                "", geo.sunit, geo.swidth,
@@ -123,6 +124,7 @@ main(int argc, char **argv)
        int                     projid32bit;
        int                     crcs_enabled;
        int                     ftype_enabled = 0;
+       int                     finobt_enabled; /* free inode btree */
 
        progname = basename(argv[0]);
        setlocale(LC_ALL, "");
@@ -244,11 +246,12 @@ main(int argc, char **argv)
        projid32bit = geo.flags & XFS_FSOP_GEOM_FLAGS_PROJID32 ? 1 : 0;
        crcs_enabled = geo.flags & XFS_FSOP_GEOM_FLAGS_V5SB ? 1 : 0;
        ftype_enabled = geo.flags & XFS_FSOP_GEOM_FLAGS_FTYPE ? 1 : 0;
+       finobt_enabled = geo.flags & XFS_FSOP_GEOM_FLAGS_FINOBT ? 1 : 0;
        if (nflag) {
                report_info(geo, datadev, isint, logdev, rtdev,
                                lazycount, dirversion, logversion,
                                attrversion, projid32bit, crcs_enabled, ci,
-                               ftype_enabled);
+                               ftype_enabled, finobt_enabled);
                exit(0);
        }
 
@@ -285,7 +288,8 @@ main(int argc, char **argv)
 
        report_info(geo, datadev, isint, logdev, rtdev,
                        lazycount, dirversion, logversion,
-                       attrversion, projid32bit, crcs_enabled, ci, 
ftype_enabled);
+                       attrversion, projid32bit, crcs_enabled, ci, 
ftype_enabled,
+                       finobt_enabled);
 
        ddsize = xi.dsize;
        dlsize = ( xi.logBBsize? xi.logBBsize :
-- 
1.8.3.1

<Prev in Thread] Current Thread [Next in Thread>