From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
avi@scylladb.com, andres@anarazel.de
Subject: Re: [PATCH 1/6] iomap: convert iomap_dio_rw() to an args structure
Date: Tue, 12 Jan 2021 12:53:08 +1100 [thread overview]
Message-ID: <20210112015308.GR331610@dread.disaster.area> (raw)
In-Reply-To: <20210112014023.GN1164246@magnolia>
On Mon, Jan 11, 2021 at 05:40:23PM -0800, Darrick J. Wong wrote:
> On Tue, Jan 12, 2021 at 12:07:41PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > Adding yet another parameter to the iomap_dio_rw() interface means
> > changing lots of filesystems to add the parameter. Convert this
> > interface to an args structure so in future we don't need to modify
> > every caller to add a new parameter.
> >
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > ---
> > fs/btrfs/file.c | 21 ++++++++++++++++-----
> > fs/ext4/file.c | 24 ++++++++++++++++++------
> > fs/gfs2/file.c | 19 ++++++++++++++-----
> > fs/iomap/direct-io.c | 30 ++++++++++++++----------------
> > fs/xfs/xfs_file.c | 30 +++++++++++++++++++++---------
> > fs/zonefs/super.c | 21 +++++++++++++++++----
> > include/linux/iomap.h | 16 ++++++++++------
> > 7 files changed, 110 insertions(+), 51 deletions(-)
> >
> > diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> > index 0e41459b8de6..a49d9fa918d1 100644
> > --- a/fs/btrfs/file.c
> > +++ b/fs/btrfs/file.c
> > @@ -1907,6 +1907,13 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from)
> > ssize_t err;
> > unsigned int ilock_flags = 0;
> > struct iomap_dio *dio = NULL;
> > + struct iomap_dio_rw_args args = {
> > + .iocb = iocb,
> > + .iter = from,
> > + .ops = &btrfs_dio_iomap_ops,
> > + .dops = &btrfs_dio_ops,
>
> /me wonders if it would make sense to move all the iomap_dio_ops fields
> into iomap_dio_rw_args to reduce pointer dereferencing when making the
> indirect call?
Perhaps so - there are only two ops defined in that structure so
there's not a whole lot of gain/loss there either way. Trivial to
do, though, with them encapsulated in this structure...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2021-01-12 1:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-12 1:07 [RFC] xfs: reduce sub-block DIO serialisation Dave Chinner
2021-01-12 1:07 ` [PATCH 1/6] iomap: convert iomap_dio_rw() to an args structure Dave Chinner
2021-01-12 1:22 ` Damien Le Moal
2021-01-12 1:40 ` Darrick J. Wong
2021-01-12 1:53 ` Dave Chinner [this message]
2021-01-12 10:31 ` Christoph Hellwig
2021-01-12 1:07 ` [PATCH 2/6] iomap: move DIO NOWAIT setup up into filesystems Dave Chinner
2021-01-12 1:07 ` [PATCH 3/6] xfs: factor out a xfs_ilock_iocb helper Dave Chinner
2021-01-12 1:07 ` [PATCH 4/6] xfs: make xfs_file_aio_write_checks IOCB_NOWAIT-aware Dave Chinner
2021-01-12 1:07 ` [PATCH 5/6] xfs: split unaligned DIO write code out Dave Chinner
2021-01-12 10:37 ` Christoph Hellwig
2021-01-12 1:07 ` [PATCH 6/6] xfs: reduce exclusive locking on unaligned dio Dave Chinner
2021-01-12 10:42 ` Christoph Hellwig
2021-01-12 17:01 ` Brian Foster
2021-01-12 17:10 ` Christoph Hellwig
2021-01-12 22:06 ` Dave Chinner
2021-01-12 8:01 ` [RFC] xfs: reduce sub-block DIO serialisation Avi Kivity
2021-01-12 22:13 ` Dave Chinner
2021-01-13 8:00 ` Avi Kivity
2021-01-13 20:38 ` Dave Chinner
2021-01-14 6:48 ` Avi Kivity
2021-01-17 21:34 ` Dave Chinner
2021-01-18 7:41 ` Avi Kivity
[not found] ` <CACz=WechdgSnVHQsg0LKjMiG8kHLujBshmc270yrdjxfpffmDQ@mail.gmail.com>
2021-01-17 21:36 ` Dave Chinner
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=20210112015308.GR331610@dread.disaster.area \
--to=david@fromorbit.com \
--cc=andres@anarazel.de \
--cc=avi@scylladb.com \
--cc=djwong@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--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