From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH V2 1/4] xfs: remove typedef xfs_attr_sf_entry_t
Date: Wed, 2 Sep 2020 10:35:51 -0700 [thread overview]
Message-ID: <20200902173551.GR6096@magnolia> (raw)
In-Reply-To: <20200902144059.284726-2-cmaiolino@redhat.com>
On Wed, Sep 02, 2020 at 04:40:56PM +0200, Carlos Maiolino wrote:
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
>
> Changelog:
> V2:
> - Reordered within the series, no functional changes
>
> fs/xfs/libxfs/xfs_attr_leaf.c | 4 ++--
> fs/xfs/libxfs/xfs_attr_sf.h | 11 ++++++-----
> 2 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
> index 305d4bc073370..76d3814f9dc79 100644
> --- a/fs/xfs/libxfs/xfs_attr_leaf.c
> +++ b/fs/xfs/libxfs/xfs_attr_leaf.c
> @@ -736,7 +736,7 @@ xfs_attr_shortform_add(
> size = XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen);
> xfs_idata_realloc(dp, size, XFS_ATTR_FORK);
> sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data;
> - sfe = (xfs_attr_sf_entry_t *)((char *)sf + offset);
> + sfe = (struct xfs_attr_sf_entry *)((char *)sf + offset);
>
> sfe->namelen = args->namelen;
> sfe->valuelen = args->valuelen;
> @@ -838,7 +838,7 @@ int
> xfs_attr_shortform_lookup(xfs_da_args_t *args)
> {
> xfs_attr_shortform_t *sf;
> - xfs_attr_sf_entry_t *sfe;
> + struct xfs_attr_sf_entry *sfe;
> int i;
> struct xfs_ifork *ifp;
>
> diff --git a/fs/xfs/libxfs/xfs_attr_sf.h b/fs/xfs/libxfs/xfs_attr_sf.h
> index bb004fb7944a7..c4afb33079184 100644
> --- a/fs/xfs/libxfs/xfs_attr_sf.h
> +++ b/fs/xfs/libxfs/xfs_attr_sf.h
> @@ -13,7 +13,6 @@
> * to fit into the literal area of the inode.
> */
> typedef struct xfs_attr_sf_hdr xfs_attr_sf_hdr_t;
> -typedef struct xfs_attr_sf_entry xfs_attr_sf_entry_t;
>
> /*
> * We generate this then sort it, attr_list() must return things in hash-order.
> @@ -28,15 +27,17 @@ typedef struct xfs_attr_sf_sort {
> } xfs_attr_sf_sort_t;
>
> #define XFS_ATTR_SF_ENTSIZE_BYNAME(nlen,vlen) /* space name/value uses */ \
> - (((int)sizeof(xfs_attr_sf_entry_t)-1 + (nlen)+(vlen)))
> + (((int)sizeof(struct xfs_attr_sf_entry)-1 + (nlen)+(vlen)))
> #define XFS_ATTR_SF_ENTSIZE_MAX /* max space for name&value */ \
> ((1 << (NBBY*(int)sizeof(uint8_t))) - 1)
> #define XFS_ATTR_SF_ENTSIZE(sfep) /* space an entry uses */ \
> - ((int)sizeof(xfs_attr_sf_entry_t)-1 + (sfep)->namelen+(sfep)->valuelen)
> + ((int)sizeof(struct xfs_attr_sf_entry)-1 + \
> + (sfep)->namelen+(sfep)->valuelen)
> #define XFS_ATTR_SF_NEXTENTRY(sfep) /* next entry in struct */ \
> - ((xfs_attr_sf_entry_t *)((char *)(sfep) + XFS_ATTR_SF_ENTSIZE(sfep)))
> + ((struct xfs_attr_sf_entry *)((char *)(sfep) + \
> + XFS_ATTR_SF_ENTSIZE(sfep)))
> #define XFS_ATTR_SF_TOTSIZE(dp) /* total space in use */ \
> - (be16_to_cpu(((xfs_attr_shortform_t *) \
> + (be16_to_cpu(((struct xfs_attr_shortform *) \
> ((dp)->i_afp->if_u1.if_data))->hdr.totsize))
>
> #endif /* __XFS_ATTR_SF_H__ */
> --
> 2.26.2
>
next prev parent reply other threads:[~2020-09-02 17:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 14:40 [PATCH 0/4 V2] Clean up xfs_attr_sf_entry Carlos Maiolino
2020-09-02 14:40 ` [PATCH V2 1/4] xfs: remove typedef xfs_attr_sf_entry_t Carlos Maiolino
2020-09-02 17:35 ` Darrick J. Wong [this message]
2020-09-03 8:52 ` Christoph Hellwig
2020-09-02 14:40 ` [PATCH V2 2/4] xfs: Remove typedef xfs_attr_shortform_t Carlos Maiolino
2020-09-02 17:36 ` Darrick J. Wong
2020-09-03 8:28 ` Carlos Maiolino
2020-09-03 8:53 ` Christoph Hellwig
2020-09-02 14:40 ` [PATCH V2 3/4] xfs: Use variable-size array for nameval in xfs_attr_sf_entry Carlos Maiolino
2020-09-02 17:52 ` Darrick J. Wong
2020-09-03 9:11 ` Christoph Hellwig
2020-09-02 14:40 ` [PATCH V2 4/4] xfs: Convert xfs_attr_sf macros to inline functions Carlos Maiolino
2020-09-02 17:54 ` Darrick J. Wong
2020-09-03 10:36 ` Carlos Maiolino
2020-09-03 9:14 ` Christoph Hellwig
2020-09-03 10:38 ` Carlos Maiolino
2020-09-03 10:39 ` Christoph Hellwig
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=20200902173551.GR6096@magnolia \
--to=darrick.wong@oracle.com \
--cc=cmaiolino@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/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