public inbox for [email protected]
 help / color / mirror / Atom feed
* IO_URING on XFS regression bug report
@ 2020-09-14  7:45 Zorro Lang
  2020-09-14 15:27 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Zorro Lang @ 2020-09-14  7:45 UTC (permalink / raw)
  To: io-uring

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.

Thanks,
Zorro


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: IO_URING on XFS regression bug report
  2020-09-14  7:45 IO_URING on XFS regression bug report Zorro Lang
@ 2020-09-14 15:27 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2020-09-14 15:27 UTC (permalink / raw)
  To: Zorro Lang, io-uring

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-14 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-14  7:45 IO_URING on XFS regression bug report Zorro Lang
2020-09-14 15:27 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox