Message ID | 160375521177.880355.5574700800853381205.stgit@magnolia (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | xfsprogs: add a inode btree blocks counts to the AGI header | expand |
On Mon, Oct 26, 2020 at 04:33:31PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@oracle.com> > > 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> > db/agi.c | 2 ++ > db/sb.c | 2 ++ > 2 files changed, 4 insertions(+) > > > diff --git a/db/agi.c b/db/agi.c > index bf21b2d40f04..cfb4f7b8528a 100644 > --- 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 8a303422b427..e3b1fe0b2e6e 100644 > --- 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; > } > >
diff --git a/db/agi.c b/db/agi.c index bf21b2d40f04..cfb4f7b8528a 100644 --- 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 8a303422b427..e3b1fe0b2e6e 100644 --- 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; }