|
|
f49185 |
From 13b8917251601e06660ed6ebe6bdeafa4c431ca3 Mon Sep 17 00:00:00 2001
|
|
|
f49185 |
From: "Darrick J. Wong" <darrick.wong@oracle.com>
|
|
|
f49185 |
Date: Fri, 20 Nov 2020 17:03:27 -0500
|
|
|
f49185 |
Subject: [PATCH] xfs_db: support displaying inode btree block counts in AGI
|
|
|
f49185 |
header
|
|
|
f49185 |
|
|
|
f49185 |
Fix up xfs_db to support displaying the btree block counts.
|
|
|
f49185 |
|
|
|
f49185 |
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
|
f49185 |
Reviewed-by: Brian Foster <bfoster@redhat.com>
|
|
|
f49185 |
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
|
|
f49185 |
---
|
|
|
f49185 |
|
|
|
f49185 |
diff --git a/db/agi.c b/db/agi.c
|
|
|
f49185 |
index bf21b2d..cfb4f7b 100644
|
|
|
f49185 |
--- a/db/agi.c
|
|
|
f49185 |
+++ b/db/agi.c
|
|
|
f49185 |
@@ -48,6 +48,8 @@ const field_t agi_flds[] = {
|
|
|
f49185 |
{ "lsn", FLDT_UINT64X, OI(OFF(lsn)), C1, 0, TYP_NONE },
|
|
|
f49185 |
{ "free_root", FLDT_AGBLOCK, OI(OFF(free_root)), C1, 0, TYP_FINOBT },
|
|
|
f49185 |
{ "free_level", FLDT_UINT32D, OI(OFF(free_level)), C1, 0, TYP_NONE },
|
|
|
f49185 |
+ { "ino_blocks", FLDT_UINT32D, OI(OFF(iblocks)), C1, 0, TYP_NONE },
|
|
|
f49185 |
+ { "fino_blocks", FLDT_UINT32D, OI(OFF(fblocks)), C1, 0, TYP_NONE },
|
|
|
f49185 |
{ NULL }
|
|
|
f49185 |
};
|
|
|
f49185 |
|
|
|
f49185 |
diff --git a/db/sb.c b/db/sb.c
|
|
|
f49185 |
index 5059b26..d63fc71 100644
|
|
|
f49185 |
--- a/db/sb.c
|
|
|
f49185 |
+++ b/db/sb.c
|
|
|
f49185 |
@@ -687,6 +687,8 @@ version_string(
|
|
|
f49185 |
strcat(s, ",RMAPBT");
|
|
|
f49185 |
if (xfs_sb_version_hasreflink(sbp))
|
|
|
f49185 |
strcat(s, ",REFLINK");
|
|
|
f49185 |
+ if (xfs_sb_version_hasinobtcounts(sbp))
|
|
|
f49185 |
+ strcat(s, ",INOBTCNT");
|
|
|
f49185 |
return s;
|
|
|
f49185 |
}
|
|
|
f49185 |
|