From: Dave Chinner <david@fromorbit.com>
To: Filipe Manana <fdmanana@kernel.org>
Cc: Zorro Lang <zlang@redhat.com>,
"Yang Xu (Fujitsu)" <xuyang2018.jy@fujitsu.com>,
"fstests@vger.kernel.org" <fstests@vger.kernel.org>,
"djwong@kernel.org" <djwong@kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"tytso@mit.edu" <tytso@mit.edu>, "shr@fb.com" <shr@fb.com>
Subject: Re: [PATCH] generic/471: Remove this broken case
Date: Mon, 21 Aug 2023 15:39:30 +1000 [thread overview]
Message-ID: <ZOL4kmQ/2ZLEzvmI@dread.disaster.area> (raw)
In-Reply-To: <CAL3q7H5n054jOAW=WgSLJAXCkmbSpHJ1yNGGJ9s7-WpdAkwgPw@mail.gmail.com>
On Sat, Aug 19, 2023 at 05:25:35PM +0100, Filipe Manana wrote:
> On Fri, Aug 18, 2023 at 1:43 PM Zorro Lang <zlang@redhat.com> wrote:
> > On Wed, Aug 16, 2023 at 02:58:10PM +0000, Yang Xu (Fujitsu) wrote:
> > > I think the url that Jens mention should be this[1] when he reviewed
> > > Stefan V7 patch for "io-uring/xfs: support async buffered writes".
> > >
> > > [1]https://lkml.kernel.org/linux-fsdevel/ca60a7dc-b16d-d8ce-f56c-547b449da8c9@kernel.dk/
> >
> > Hi Filipe,
> >
> > Does above explanation make sense to you?
>
> Not completely.
>
> It justifies that the test's assumptions are not necessarily correct,
> that I understood and it's reasonable.
>
> However I don't see, neither in that thread nor in this patch's
> changelog, why the test started to fail (on xfs, it still passes on
> btrfs and ext4) after adding support for async buffered IO writes to
> xfs and iomap - as all the writes done by the test are using direct
> IO.
We changed how timestamps are updated so that they are aware of
IOCB_NOWAIT. If the IOCB_NOWIAT DIO write now needs to update the
inode timestamps, it will return -EAGAIN instead of doing
potentially blocking operations that require IO to complete (i.e.
taking a transaction reservation).
Hence the first time we go to do a DIO read an inode, it's going to
do an atime update, which now occurrs from an IOCB_NOWAIT context
and we return -EAGAIN....
Yes, we added non-blocking timestamp updates as part of the async
buffered write support, but this was a general XFS IO path change of
behaviour to address a potential blocking point in *all* IOCB_NOWAIT
reads and writes, buffered or direct.
> At least the changelog should point to that thread, and not the one it
> currently refers to because it doesn't provide any useful information.
> For completeness it should also justify why the async buffered write
> support broke the test, as it points out the test fails after those 2
> commits for buffered write support, yet there are no buffered writes
> performed by the test.
async buffered writes didn't break the test. The addition of
nonblocking timestamp updates in XFS is what causes the test to now
fail.
Indeed, we may change this XFS behaviour again some day - if we can
guarantee that we can get a transaciton reservation without blocking
then we -could- allow the timestamp update to run in IOCB_NOWAIT
context. Doing this would then mean the test might randomly fail,
depending on whether the timestamp update can be done without
blocking or not....
Put simply, the test is not validating that RWF_NOWAIT is behaving
correctly - it just was a simple operation that kinda exercised
RWF_NOWAIT semantics when we had no other way to test this code. It
has outlived it's original purpose, so it should be removed...
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2023-08-21 5:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 14:41 [PATCH] generic/471: Remove this broken case Yang Xu
2023-08-14 15:37 ` Darrick J. Wong
2023-08-14 21:40 ` Jens Axboe
2023-08-14 22:42 ` Bill O'Donnell
2023-08-15 10:44 ` Filipe Manana
2023-08-16 14:58 ` Yang Xu (Fujitsu)
2023-08-18 12:43 ` Zorro Lang
2023-08-19 16:25 ` Filipe Manana
2023-08-20 3:59 ` Zorro Lang
2023-08-21 5:39 ` Dave Chinner [this message]
2023-08-21 11:16 ` Filipe Manana
2023-08-21 14:59 ` Yang Xu (Fujitsu)
2023-08-24 2:33 ` 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=ZOL4kmQ/2ZLEzvmI@dread.disaster.area \
--to=david@fromorbit.com \
--cc=axboe@kernel.dk \
--cc=djwong@kernel.org \
--cc=fdmanana@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=shr@fb.com \
--cc=tytso@mit.edu \
--cc=xuyang2018.jy@fujitsu.com \
--cc=zlang@redhat.com \
/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