From: Eric Sandeen <sandeen@sandeen.net>
To: xfs@oss.sgi.com
Subject: Re: [PATCH 3/5] libxfs: move struct xfs_attr_shortform to xfs_da_format.h
Date: Fri, 22 Jan 2016 23:08:12 -0600 [thread overview]
Message-ID: <56A30ABC.9010508@sandeen.net> (raw)
In-Reply-To: <20160123003514.2475.80318.stgit@birch.djwong.org>
On 1/22/16 6:35 PM, Darrick J. Wong wrote:
> Move the shortform attr structure definition to the same place as the
> other attribute structure definitions for consistency and also so that
> xfs/122 verifies the structure size.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> ---
> libxfs/xfs_attr_sf.h | 16 ----------------
> libxfs/xfs_da_format.h | 16 ++++++++++++++++
> libxfs/xfs_inode_fork.c | 1 +
> 3 files changed, 17 insertions(+), 16 deletions(-)
>
>
> diff --git a/libxfs/xfs_attr_sf.h b/libxfs/xfs_attr_sf.h
> index 919756e..90928bb 100644
> --- a/libxfs/xfs_attr_sf.h
> +++ b/libxfs/xfs_attr_sf.h
> @@ -24,22 +24,6 @@
> * Small attribute lists are packed as tightly as possible so as
> * to fit into the literal area of the inode.
> */
> -
> -/*
> - * Entries are packed toward the top as tight as possible.
> - */
> -typedef struct xfs_attr_shortform {
> - struct xfs_attr_sf_hdr { /* constant-structure header block */
> - __be16 totsize; /* total bytes in shortform list */
> - __u8 count; /* count of active entries */
> - } hdr;
> - struct xfs_attr_sf_entry {
> - __uint8_t namelen; /* actual length of name (no NULL) */
> - __uint8_t valuelen; /* actual length of value (no NULL) */
> - __uint8_t flags; /* flags bits (see xfs_attr_leaf.h) */
> - __uint8_t nameval[1]; /* name & value bytes concatenated */
> - } list[1]; /* variable sized array */
> -} xfs_attr_shortform_t;
> typedef struct xfs_attr_sf_hdr xfs_attr_sf_hdr_t;
> typedef struct xfs_attr_sf_entry xfs_attr_sf_entry_t;
>
> diff --git a/libxfs/xfs_da_format.h b/libxfs/xfs_da_format.h
> index b14bbd6..8d4d8bc 100644
> --- a/libxfs/xfs_da_format.h
> +++ b/libxfs/xfs_da_format.h
> @@ -641,6 +641,22 @@ xfs_dir2_block_leaf_p(struct xfs_dir2_block_tail *btp)
> */
> #define XFS_ATTR_LEAF_MAPSIZE 3 /* how many freespace slots */
>
> +/*
> + * Entries are packed toward the top as tight as possible.
> + */
> +typedef struct xfs_attr_shortform {
> + struct xfs_attr_sf_hdr { /* constant-structure header block */
> + __be16 totsize; /* total bytes in shortform list */
> + __u8 count; /* count of active entries */
> + } hdr;
> + struct xfs_attr_sf_entry {
> + __uint8_t namelen; /* actual length of name (no NULL) */
> + __uint8_t valuelen; /* actual length of value (no NULL) */
> + __uint8_t flags; /* flags bits (see xfs_attr_leaf.h) */
> + __uint8_t nameval[1]; /* name & value bytes concatenated */
> + } list[1]; /* variable sized array */
> +} xfs_attr_shortform_t;
> +
> typedef struct xfs_attr_leaf_map { /* RLE map of free bytes */
> __be16 base; /* base of free region */
> __be16 size; /* length of free region */
> diff --git a/libxfs/xfs_inode_fork.c b/libxfs/xfs_inode_fork.c
> index e1968b4..f40649e 100644
> --- a/libxfs/xfs_inode_fork.c
> +++ b/libxfs/xfs_inode_fork.c
> @@ -27,6 +27,7 @@
> #include "xfs_bmap.h"
> #include "xfs_trace.h"
> #include "xfs_attr_sf.h"
> +#include "xfs_da_format.h"
>
> kmem_zone_t *xfs_ifork_zone;
>
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-01-23 5:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-23 0:35 [PATCH 1/5] xfs_io: detect the '-R' option in getopt Darrick J. Wong
2016-01-23 0:35 ` [PATCH 2/5] libxfs: refactor the btree size calculator code Darrick J. Wong
2016-02-01 15:17 ` Brian Foster
2016-02-01 19:14 ` Darrick J. Wong
2016-02-11 23:48 ` Darrick J. Wong
2016-02-12 1:07 ` Dave Chinner
2016-02-12 1:24 ` Darrick J. Wong
2016-01-23 0:35 ` [PATCH 3/5] libxfs: move struct xfs_attr_shortform to xfs_da_format.h Darrick J. Wong
2016-01-23 5:08 ` Eric Sandeen [this message]
2016-01-23 0:35 ` [PATCH 4/5] xfs_db: don't error out when blocksize > 64 * inodesize Darrick J. Wong
2016-02-01 15:18 ` Brian Foster
2016-01-23 0:35 ` [PATCH 5/5] xfs_io: print dedupe errors to stderr, not stdout Darrick J. Wong
2016-02-02 5:14 ` Dave Chinner
2016-02-02 5:16 ` Darrick J. Wong
2016-02-02 5:16 ` Dave Chinner
2016-01-23 4:55 ` [PATCH 1/5] xfs_io: detect the '-R' option in getopt Eric Sandeen
2016-01-23 6:18 ` Darrick J. Wong
2016-01-23 18:03 ` Eric Sandeen
2016-01-26 22:09 ` Darrick J. Wong
2016-01-27 0:58 ` [PATCH 1/5 v2] " Darrick J. Wong
2016-01-27 4:30 ` Eric Sandeen
2016-01-27 4:44 ` [PATCH 6/5] mkfs: factor finobt changes into min log size when formatting Darrick J. Wong
2016-02-01 15:18 ` Brian Foster
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=56A30ABC.9010508@sandeen.net \
--to=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/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