From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: Carlos Maiolino <cmaiolino@redhat.com>, linux-xfs@vger.kernel.org
Subject: Re: [RFC PATCH] xfs: add inline helper to convert from data fork to xfs_attr_shortform
Date: Tue, 1 Sep 2020 17:11:48 +0100 [thread overview]
Message-ID: <20200901161148.GA22553@infradead.org> (raw)
In-Reply-To: <20200901141341.GB174813@bfoster>
On Tue, Sep 01, 2020 at 10:13:41AM -0400, Brian Foster wrote:
> FWIW, I thought we tried to avoid including headers from other headers
> like this. I'm also wondering if it's an issue that we'd be including a
> a header that is external to libxfs from a libxfs header. Perhaps this
> could be simplified by passing the xfs_ifork pointer to the new helper
> rather than the xfs_inode and/or moving the helper to
> libxfs/xfs_inode_fork.h and putting a forward declaration of
> xfs_attr_shortform in there..?
Or just turn it into a macro, which might be easiet?
> > +static inline struct xfs_attr_shortform *
> > +xfs_attr_ifork_to_sf(struct xfs_inode *ino) {
> > + return (struct xfs_attr_shortform *)ino->i_afp->if_u1.if_data;
> > +}
I also find the name a little strange as it takes the inode
maybe xfs_inode_to_attr_sf ?
prev parent reply other threads:[~2020-09-01 16:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 9:59 [RFC PATCH] xfs: add inline helper to convert from data fork to xfs_attr_shortform Carlos Maiolino
2020-09-01 14:13 ` Brian Foster
2020-09-01 15:23 ` Darrick J. Wong
2020-09-03 9:15 ` Christoph Hellwig
2020-09-01 16:11 ` Christoph Hellwig [this message]
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=20200901161148.GA22553@infradead.org \
--to=hch@infradead.org \
--cc=bfoster@redhat.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