]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: add missing padding fields
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 6 Dec 2017 15:17:08 +0000 (09:17 -0600)
committerEric Sandeen <sandeen@redhat.com>
Wed, 6 Dec 2017 15:17:08 +0000 (09:17 -0600)
Several data structures are missing padding fields from their field
definitions.  Add them so that they can be printed out if explicitly
requested.

Fix the AGI field order to be consistent with the structure
definition while we're at it.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
[sandeen: make them available but not printed by default]
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/agi.c
db/dir2.c
db/inode.c

index fb69210be279882cb6af2f445a0c68c0f125ff82..fab146e98177b93e47b844711801ede9c849f602 100644 (file)
--- a/db/agi.c
+++ b/db/agi.c
@@ -55,8 +55,9 @@ const field_t agi_flds[] = {
        { "unlinked", FLDT_AGINONN, OI(OFF(unlinked)),
          CI(XFS_AGI_UNLINKED_BUCKETS), FLD_ARRAY, TYP_NONE },
        { "uuid", FLDT_UUID, OI(OFF(uuid)), C1, 0, TYP_NONE },
-       { "lsn", FLDT_UINT64X, OI(OFF(lsn)), C1, 0, TYP_NONE },
        { "crc", FLDT_CRC, OI(OFF(crc)), C1, 0, TYP_NONE },
+       { "pad32", FLDT_UINT32X, OI(OFF(pad32)), C1, FLD_SKIPALL, TYP_NONE },
+       { "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 },
        { NULL }
index 7f7ea5a7972cdbd9ae83501f89a6795ff67c31b8..0bd34378c8e458f0cff80e0172569cb881156fb0 100644 (file)
--- a/db/dir2.c
+++ b/db/dir2.c
@@ -940,6 +940,7 @@ const field_t       dir3_data_hdr_flds[] = {
        { "hdr", FLDT_DIR3_BLKHDR, OI(DH3OFF(hdr)), C1, 0, TYP_NONE },
        { "bestfree", FLDT_DIR2_DATA_FREE, OI(DH3OFF(best_free)),
          CI(XFS_DIR2_DATA_FD_COUNT), FLD_ARRAY, TYP_NONE },
+       { "pad", FLDT_UINT32X, OI(DH3OFF(pad)), C1, FLD_SKIPALL, TYP_NONE },
        { NULL }
 };
 
@@ -948,6 +949,7 @@ const field_t       dir3_leaf_hdr_flds[] = {
        { "info", FLDT_DA3_BLKINFO, OI(LH3OFF(info)), C1, 0, TYP_NONE },
        { "count", FLDT_UINT16D, OI(LH3OFF(count)), C1, 0, TYP_NONE },
        { "stale", FLDT_UINT16D, OI(LH3OFF(stale)), C1, 0, TYP_NONE },
+       { "pad", FLDT_UINT32X, OI(LH3OFF(pad)), C1, FLD_SKIPALL, TYP_NONE },
        { NULL }
 };
 
@@ -957,6 +959,7 @@ const field_t       dir3_free_hdr_flds[] = {
        { "firstdb", FLDT_INT32D, OI(FH3OFF(firstdb)), C1, 0, TYP_NONE },
        { "nvalid", FLDT_INT32D, OI(FH3OFF(nvalid)), C1, 0, TYP_NONE },
        { "nused", FLDT_INT32D, OI(FH3OFF(nused)), C1, 0, TYP_NONE },
+       { "pad", FLDT_UINT32X, OI(FH3OFF(pad)), C1, FLD_SKIPALL, TYP_NONE },
        { NULL }
 };
 
index 6f971c63aaeb07d921fcf6801fc352546f6b0750..b3f53d3b874dbeeaa354764159813961ca3a2c4d 100644 (file)
@@ -102,6 +102,7 @@ const field_t       inode_core_flds[] = {
          inode_core_projid_count, FLD_COUNT, TYP_NONE },
        { "projid_hi", FLDT_UINT16D, OI(COFF(projid_hi)),
          inode_core_projid_count, FLD_COUNT, TYP_NONE },
+       { "pad", FLDT_UINT8X, OI(OFF(pad)), CI(6), FLD_ARRAY|FLD_SKIPALL, TYP_NONE },
        { "uid", FLDT_UINT32D, OI(COFF(uid)), C1, 0, TYP_NONE },
        { "gid", FLDT_UINT32D, OI(COFF(gid)), C1, 0, TYP_NONE },
        { "flushiter", FLDT_UINT16D, OI(COFF(flushiter)), C1, 0, TYP_NONE },
@@ -173,6 +174,7 @@ const field_t       inode_v3_flds[] = {
        { "lsn", FLDT_UINT64X, OI(COFF(lsn)), C1, 0, TYP_NONE },
        { "flags2", FLDT_UINT64X, OI(COFF(flags2)), C1, 0, TYP_NONE },
        { "cowextsize", FLDT_EXTLEN, OI(COFF(cowextsize)), C1, 0, TYP_NONE },
+       { "pad2", FLDT_UINT8X, OI(OFF(pad2)), CI(12), FLD_ARRAY|FLD_SKIPALL, TYP_NONE },
        { "crtime", FLDT_TIMESTAMP, OI(COFF(crtime)), C1, 0, TYP_NONE },
        { "inumber", FLDT_INO, OI(COFF(ino)), C1, 0, TYP_NONE },
        { "uuid", FLDT_UUID, OI(COFF(uuid)), C1, 0, TYP_NONE },