From: Jens Axboe <[email protected]>
To: Zorro Lang <[email protected]>, [email protected]
Subject: Re: IO_URING on XFS regression bug report
Date: Mon, 14 Sep 2020 09:27:15 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 9/14/20 1:45 AM, Zorro Lang wrote:
> Hi,
>
> Due to I don't know how to report a bug to io_uring maillist, I didn't find a
> proper bug component for io_uring. So I have to send this email directly to
> report this bug:
>
> https://bugzilla.kernel.org/show_bug.cgi?id=209243
>
> Due to it's reproducible on XFS+LVM, but the first failed commit is an io_uring
> patch:
>
> bcf5a06304d6 ("io_uring: support true async buffered reads, if file provides it")
>
> So I'm not sure if it's an io_uring bug or xfs bug, so report to io_uring@ list to
> help to analyze this failure.
Can you try with the below?
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 892a8dcf92c7..6c6aa37031d5 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2293,13 +2293,17 @@ static bool io_resubmit_prep(struct io_kiocb *req, int error)
goto end_req;
}
- ret = io_import_iovec(rw, req, &iovec, &iter, false);
- if (ret < 0)
- goto end_req;
- ret = io_setup_async_rw(req, iovec, inline_vecs, &iter, false);
- if (!ret)
+ if (!req->io) {
+ ret = io_import_iovec(rw, req, &iovec, &iter, false);
+ if (ret < 0)
+ goto end_req;
+ ret = io_setup_async_rw(req, iovec, inline_vecs, &iter, false);
+ if (!ret)
+ return true;
+ kfree(iovec);
+ } else {
return true;
- kfree(iovec);
+ }
end_req:
req_set_fail_links(req);
io_req_complete(req, ret);
@@ -3096,6 +3100,13 @@ static bool io_rw_should_retry(struct io_kiocb *req)
if (file_can_poll(req->file) || !(req->file->f_mode & FMODE_BUF_RASYNC))
return false;
+ /*
+ * If we can't do nonblock submit without -EAGAIN direct return,
+ * then don't use the retry based approach.
+ */
+ if (!io_file_supports_async(req->file, READ))
+ return false;
+
wait->wait.func = io_async_buf_func;
wait->wait.private = req;
wait->wait.flags = 0;
--
Jens Axboe
prev parent reply other threads:[~2020-09-14 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 7:45 IO_URING on XFS regression bug report Zorro Lang
2020-09-14 15:27 ` Jens Axboe [this message]
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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