From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
avi@scylladb.com, Dave Chinner <dchinner@redhat.com>
Subject: Re: [PATCH 11/11] xfs: reduce exclusive locking on unaligned dio
Date: Wed, 20 Jan 2021 11:58:42 -0800 [thread overview]
Message-ID: <20210120195842.GR3134581@magnolia> (raw)
In-Reply-To: <20210120184400.GA29173@lst.de>
On Wed, Jan 20, 2021 at 07:44:00PM +0100, Christoph Hellwig wrote:
> [another full quote removed, guys please send properly formatted email]
>
> On Wed, Jan 20, 2021 at 10:40:56AM -0800, Darrick J. Wong wrote:
> > > + if (!(flags & IOMAP_DIO_UNALIGNED))
> > > + inode_dio_wait(VFS_I(ip));
> >
> > Er... this really confused me when I read it -- my first thought was
> > "How can we be in the unaligned direct write function but DIO_UNALIGNED
> > isn't set? Wouldn't we be in some other function if we're doing an
> > aligned direct write?"
> >
> > Then I looked upthread to where Christph said he'd renamed it
> > IOMAP_DIO_SUBBLOCK, but I didn't think that was sufficiently better:
> >
> > if (!(flags & IOMAP_DIO_SUBBLOCK))
> > iomap_dio_wait(...);
> >
> > This flag doesn't have a 1:1 relationship with the iocb asking for an
> > (fsblock-)unaligned write or the iocb saying that the write involves
> > sub-block io -- this flag really means "I require a stable written
> > mapping, no post-processing (of the disk block) allowed".
>
> Would:
>
> if (flags & IOMAP_DIO_FORCE_WAIT)
> inode_dio_wait(VFS_I(ip));
>
> look any better to you? Behavior would be the same.
Looks fine to me.
--D
next prev parent reply other threads:[~2021-01-20 20:01 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 19:35 reduce sub-block DIO serialisation v2 Christoph Hellwig
2021-01-18 19:35 ` [PATCH 01/11] xfs: factor out a xfs_ilock_iocb helper Christoph Hellwig
2021-01-20 18:41 ` Darrick J. Wong
2021-01-18 19:35 ` [PATCH 02/11] xfs: make xfs_file_aio_write_checks IOCB_NOWAIT-aware Christoph Hellwig
[not found] ` <CACz=WeeaqMrGM53pJF0C_Wt2JuavTOnOV26-osPviYLUpqUmFw@mail.gmail.com>
2021-01-20 16:28 ` Christoph Hellwig
2021-01-20 18:42 ` Darrick J. Wong
2021-01-18 19:35 ` [PATCH 03/11] xfs: cleanup the read/write helper naming Christoph Hellwig
2021-01-19 15:23 ` Brian Foster
2021-01-20 18:43 ` Darrick J. Wong
2021-01-18 19:35 ` [PATCH 04/11] xfs: remove the buffered I/O fallback assert Christoph Hellwig
2021-01-19 15:23 ` Brian Foster
2021-01-20 18:43 ` Darrick J. Wong
2021-01-18 19:35 ` [PATCH 05/11] xfs: simplify the read/write tracepoints Christoph Hellwig
2021-01-19 15:23 ` Brian Foster
2021-01-20 18:45 ` Darrick J. Wong
2021-01-18 19:35 ` [PATCH 06/11] xfs: improve the reflink_bounce_dio_write tracepoint Christoph Hellwig
2021-01-19 15:23 ` Brian Foster
2021-01-20 18:45 ` Darrick J. Wong
2021-01-18 19:35 ` [PATCH 07/11] xfs: split unaligned DIO write code out Christoph Hellwig
2021-01-19 15:23 ` Brian Foster
2021-01-20 18:46 ` Darrick J. Wong
2021-01-18 19:35 ` [PATCH 08/11] iomap: rename the flags variable in __iomap_dio_rw Christoph Hellwig
2021-01-18 20:34 ` Dave Chinner
2021-01-19 15:23 ` Brian Foster
2021-01-20 18:46 ` Darrick J. Wong
2021-01-18 19:35 ` [PATCH 09/11] iomap: pass a flags argument to iomap_dio_rw Christoph Hellwig
2021-01-19 15:23 ` Brian Foster
2021-01-20 18:17 ` Darrick J. Wong
2021-01-20 18:35 ` Christoph Hellwig
2021-01-18 19:35 ` [PATCH 10/11] iomap: add a IOMAP_DIO_UNALIGNED flag Christoph Hellwig
2021-01-18 20:45 ` Dave Chinner
2021-01-18 21:41 ` Matthew Wilcox
2021-01-20 16:40 ` Christoph Hellwig
2021-01-20 18:47 ` Darrick J. Wong
2021-01-18 19:35 ` [PATCH 11/11] xfs: reduce exclusive locking on unaligned dio Christoph Hellwig
2021-01-18 20:55 ` Dave Chinner
2021-01-20 16:36 ` Christoph Hellwig
2021-01-20 18:40 ` Darrick J. Wong
2021-01-20 18:44 ` Christoph Hellwig
2021-01-20 19:58 ` Darrick J. Wong [this message]
2021-01-21 8:58 reduce sub-block DIO serialisation v3 Christoph Hellwig
2021-01-21 8:59 ` [PATCH 11/11] xfs: reduce exclusive locking on unaligned dio Christoph Hellwig
2021-01-21 9:35 ` Dave Chinner
2021-01-22 10:20 ` Christoph Hellwig
2021-01-21 13:33 ` Brian Foster
2021-01-21 19:01 ` Darrick J. Wong
2021-01-22 16:20 reduce sub-block DIO serialisation v4 Christoph Hellwig
2021-01-22 16:20 ` [PATCH 11/11] xfs: reduce exclusive locking on unaligned dio Christoph Hellwig
2021-01-22 17:24 ` Darrick J. Wong
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=20210120195842.GR3134581@magnolia \
--to=djwong@kernel.org \
--cc=avi@scylladb.com \
--cc=dchinner@redhat.com \
--cc=hch@lst.de \
--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;
as well as URLs for NNTP newsgroup(s).