From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Jens Axboe <axboe@kernel.dk>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
linux-block@vger.kernel.org,
Aarushi Mehta <mehta.aaru20@gmail.com>,
Julia Suvorova <jusual@mail.ru>,
linux-fsdevel@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: EIO with io_uring O_DIRECT writes on ext4
Date: Tue, 23 Jul 2019 16:07:13 -0400 [thread overview]
Message-ID: <20190723200713.GA4565@mit.edu> (raw)
In-Reply-To: <9a13c3b9-ecf2-6ba7-f0fb-c59a1e1539f3@kernel.dk>
On Tue, Jul 23, 2019 at 09:20:05AM -0600, Jens Axboe wrote:
>
> I actually think it's XFS that's broken here, it's not passing down
> the IOCB_NOWAIT -> IOMAP_NOWAIT -> REQ_NOWAIT. This means we lose that
> important request bit, and we just block instead of triggering the
> not_supported case.
>
> Outside of that, that case needs similar treatment to what I did for
> the EAGAIN case here:
>
> http://git.kernel.dk/cgit/linux-block/commit/?h=for-linus&id=893a1c97205a3ece0cbb3f571a3b972080f3b4c7
>
> It was a big mistake to pass back these values in an async fashion,
> and it also means that some accounting in other drivers are broken
> as we can get completions without the bio actually being submitted.
Hmmm, I had been trying to track down a similar case with virtio-scsi
on top of LVM, using a Google Compute Engine VM. In that case,
xfstests generic/471 was failing with EIO, when it would pass just
*fine* when I was using KVM with a virtio-scsi device w/o LVM.
So it sounds like that what's going on is if the device driver (or
LVM, or anything else in the storage stack) needs to do a blocking
memory allocation, and NOWAIT is requested, we'll end up returning EIO
because an asynchronous error is getting reported, where as if we
could return it synchronously, the file system could properly return
EOPNOTSUP. Am I understanding you correctly?
I guess there's a separate question hiding here, which is whether
there's a way to allow dm-linear or dm-crypt to handle NOWAIT requests
without needing to block.
- Ted
next prev parent reply other threads:[~2019-07-23 20:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 8:07 EIO with io_uring O_DIRECT writes on ext4 Stefan Hajnoczi
2019-07-23 15:20 ` Jens Axboe
2019-07-23 20:07 ` Theodore Y. Ts'o [this message]
2019-07-23 20:11 ` Jens Axboe
2019-07-23 22:05 ` Dave Chinner
2019-07-23 22:19 ` Jens Axboe
2019-07-24 2:23 ` 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=20190723200713.GA4565@mit.edu \
--to=tytso@mit.edu \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jusual@mail.ru \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mehta.aaru20@gmail.com \
--cc=stefanha@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;
as well as URLs for NNTP newsgroup(s).