From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
avi@scylladb.com, andres@anarazel.de
Subject: Re: [PATCH 6/6] xfs: reduce exclusive locking on unaligned dio
Date: Tue, 12 Jan 2021 11:42:57 +0100 [thread overview]
Message-ID: <X/19MZHQtcnj9NDc@infradead.org> (raw)
In-Reply-To: <20210112010746.1154363-7-david@fromorbit.com>
> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> index bba33be17eff..f5c75404b8a5 100644
> --- a/fs/xfs/xfs_file.c
> +++ b/fs/xfs/xfs_file.c
> @@ -408,7 +408,7 @@ xfs_file_aio_write_checks(
> drained_dio = true;
> goto restart;
> }
> -
> +
Spurious unrelated whitespace change.
> struct iomap_dio_rw_args args = {
> .iocb = iocb,
> .iter = from,
> .ops = &xfs_direct_write_iomap_ops,
> .dops = &xfs_dio_write_ops,
> .wait_for_completion = is_sync_kiocb(iocb),
> - .nonblocking = (iocb->ki_flags & IOCB_NOWAIT),
> + .nonblocking = true,
I think this is in many ways wrong. As far as I can tell you want this
so that we get the imap_spans_range in xfs_direct_write_iomap_begin. But
we should not trigger any of the other checks, so we'd really need
another flag instead of reusing this one.
imap_spans_range is a bit pessimistic for avoiding the exclusive lock,
but I guess we could live that if it is clearly documented as helping
with the implementation, but we really should not automatically trigger
all the other effects of nowait I/O.
next prev parent reply other threads:[~2021-01-12 10:44 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
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 [this message]
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=X/19MZHQtcnj9NDc@infradead.org \
--to=hch@infradead.org \
--cc=andres@anarazel.de \
--cc=avi@scylladb.com \
--cc=david@fromorbit.com \
--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