]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: support displaying inode btree block counts in AGI header
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 20 Nov 2020 22:03:27 +0000 (17:03 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 20 Nov 2020 22:03:27 +0000 (17:03 -0500)
Fix up xfs_db to support displaying the btree block counts.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/agi.c
db/sb.c

index bf21b2d40f0444bfadb874a9ba9ea4a944268067..cfb4f7b8528a3650ec086d68a62d6e039b20129f 100644 (file)
--- a/db/agi.c
+++ b/db/agi.c
@@ -48,6 +48,8 @@ const field_t agi_flds[] = {
        { "lsn", FLDT_UINT64X, OI(OFF(lsn)), C1, 0, TYP_NONE },
        { "free_root", FLDT_AGBLOCK, OI(OFF(free_root)), C1, 0, TYP_FINOBT },
        { "free_level", FLDT_UINT32D, OI(OFF(free_level)), C1, 0, TYP_NONE },
+       { "ino_blocks", FLDT_UINT32D, OI(OFF(iblocks)), C1, 0, TYP_NONE },
+       { "fino_blocks", FLDT_UINT32D, OI(OFF(fblocks)), C1, 0, TYP_NONE },
        { NULL }
 };
 
diff --git a/db/sb.c b/db/sb.c
index 8a303422b427451496defca6ab8b98ac5fb9ead6..e3b1fe0b2e6ecee28dfe35f12bdf83d919273644 100644 (file)
--- a/db/sb.c
+++ b/db/sb.c
@@ -687,6 +687,8 @@ version_string(
                strcat(s, ",RMAPBT");
        if (xfs_sb_version_hasreflink(sbp))
                strcat(s, ",REFLINK");
+       if (xfs_sb_version_hasinobtcounts(sbp))
+               strcat(s, ",INOBTCNT");
        return s;
 }