From 0ef2801423be33d80b52b14b6b55b3713a325dba Mon Sep 17 00:00:00 2001 From: Stefano Garzarella Date: Wed, 28 Jul 2021 15:15:15 +0200 Subject: [PATCH 1/3] MAINTAINERS: add Stefano Garzarella as io_uring reviewer I've been working with io_uring for a while so I'd like to help with reviews. Signed-off-by: Stefano Garzarella Message-Id: <20210728131515.131045-1-sgarzare@redhat.com> Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 42ac45c3e5..1776d0950b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3257,6 +3257,7 @@ Linux io_uring M: Aarushi Mehta M: Julia Suvorova M: Stefan Hajnoczi +R: Stefano Garzarella L: qemu-block@nongnu.org S: Maintained F: block/io_uring.c From 54caccb3657e3960d8f5d57ab8e867028325d131 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Thu, 29 Jul 2021 11:10:29 +0200 Subject: [PATCH 2/3] block/io_uring: resubmit when result is -EAGAIN Linux SCSI can throw spurious -EAGAIN in some corner cases in its completion path, which will end up being the result in the completed io_uring request. Resubmitting such requests should allow block jobs to complete, even if such spurious errors are encountered. Co-authored-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Signed-off-by: Fabian Ebner Message-id: 20210729091029.65369-1-f.ebner@proxmox.com Signed-off-by: Stefan Hajnoczi --- block/io_uring.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/block/io_uring.c b/block/io_uring.c index 00a3ee9fb8..dfa475cc87 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -165,7 +165,21 @@ static void luring_process_completions(LuringState *s) total_bytes = ret + luringcb->total_read; if (ret < 0) { - if (ret == -EINTR) { + /* + * Only writev/readv/fsync requests on regular files or host block + * devices are submitted. Therefore -EAGAIN is not expected but it's + * known to happen sometimes with Linux SCSI. Submit again and hope + * the request completes successfully. + * + * For more information, see: + * https://lore.kernel.org/io-uring/20210727165811.284510-3-axboe@kernel.dk/T/#u + * + * If the code is changed to submit other types of requests in the + * future, then this workaround may need to be extended to deal with + * genuine -EAGAIN results that should not be resubmitted + * immediately. + */ + if (ret == -EINTR || ret == -EAGAIN) { luring_resubmit(s, luringcb); continue; } From cc8eecd7f105a1dff5876adeb238a14696061a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 28 Jul 2021 20:33:40 +0200 Subject: [PATCH 3/3] MAINTAINERS: Added myself as a reviewer for the NVMe Block Driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I'm interested in following the activity around the NVMe bdrv. Signed-off-by: Philippe Mathieu-Daudé Message-id: 20210728183340.2018313-1-philmd@redhat.com Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1776d0950b..a3d598459a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3178,6 +3178,7 @@ F: block/null.c NVMe Block Driver M: Stefan Hajnoczi R: Fam Zheng +R: Philippe Mathieu-Daudé L: qemu-block@nongnu.org S: Supported F: block/nvme*