linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: sandeen@redhat.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/5 V2] xfs_db: add missing padding fields
Date: Mon, 4 Dec 2017 15:56:05 -0800	[thread overview]
Message-ID: <20171204235605.GA19219@magnolia> (raw)
In-Reply-To: <5a7bec9c-999f-983e-2683-e7b55109f713@sandeen.net>

On Mon, Dec 04, 2017 at 05:54:44PM -0600, Eric Sandeen wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> 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>
> [sandeen: make them available but not printed by default]

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
> ---
> 
> v2: make available but not printed by default
> 
> diff --git a/db/agi.c b/db/agi.c
> index fb69210..fab146e 100644
> --- 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 }
> diff --git a/db/dir2.c b/db/dir2.c
> index 7f7ea5a..0bd3437 100644
> --- 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 }
>  };
>  
> diff --git a/db/inode.c b/db/inode.c
> index 6f971c6..b3f53d3 100644
> --- a/db/inode.c
> +++ b/db/inode.c
> @@ -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 },
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-12-04 23:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 19:56 [PATCH 0/5] xfsprogs: 4.15 rollup Darrick J. Wong
2017-11-17 19:56 ` [PATCH 1/5] xfs_db: print structure padding fields consistently Darrick J. Wong
2017-11-30 21:37   ` Eric Sandeen
2017-11-30 21:51     ` Darrick J. Wong
2017-11-30 21:57       ` Eric Sandeen
2017-11-30 22:01         ` Darrick J. Wong
2017-12-04 23:54   ` [PATCH 1/5 V2] " Eric Sandeen
2017-12-04 23:56     ` Darrick J. Wong
2017-11-17 19:56 ` [PATCH 2/5] xfs_db: add missing padding fields Darrick J. Wong
2017-12-04 23:54   ` [PATCH 2/5 V2] " Eric Sandeen
2017-12-04 23:56     ` Darrick J. Wong [this message]
2017-11-17 19:56 ` [PATCH 3/5] xfs_io: pull xfs errortag definitions from libxfs Darrick J. Wong
2017-11-30 21:40   ` Eric Sandeen
2017-11-17 19:57 ` [PATCH 4/5] xfs_io: provide an interface to the scrub ioctls Darrick J. Wong
2017-12-01  3:46   ` Eric Sandeen
2017-12-01 17:02     ` Darrick J. Wong
2017-12-01 16:06   ` Eric Sandeen
2017-12-01 17:03     ` Darrick J. Wong
2017-12-01 19:02   ` [PATCH v2 " Darrick J. Wong
2017-12-04 21:19     ` Eric Sandeen
2017-11-17 19:57 ` [PATCH 5/5] man: describe the metadata scrubbing ioctl Darrick J. Wong
2017-12-01  4:34   ` Eric Sandeen
2017-12-01  5:00     ` Eric Sandeen
2017-12-01 18:12     ` Darrick J. Wong
2017-12-01 19:03   ` [PATCH v2 " Darrick J. Wong
2017-12-04 21:19     ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171204235605.GA19219@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).