1 | The following changes since commit 768cef2974fb1fa30dd188b043ea737e13fea477: | 1 | The following changes since commit 3521ade3510eb5cefb2e27a101667f25dad89935: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-07-24 10:37:52 +0100) | 3 | Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-07-29' into staging (2021-07-29 13:17:20 +0100) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | git://github.com/stefanha/qemu.git tags/block-pull-request | 7 | https://gitlab.com/stefanha/qemu.git tags/block-pull-request |
8 | 8 | ||
9 | for you to fetch changes up to 042b757cc77c9580b99ef2781cfb0a2d1bf495a6: | 9 | for you to fetch changes up to cc8eecd7f105a1dff5876adeb238a14696061a4a: |
10 | 10 | ||
11 | block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom (2018-07-24 14:27:41 +0100) | 11 | MAINTAINERS: Added myself as a reviewer for the NVMe Block Driver (2021-07-29 17:17:34 +0100) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Pull request | 14 | Pull request |
15 | 15 | ||
16 | Regression fix for host block devices with the file-posix driver when aio=native is in use. | 16 | The main fix here is for io_uring. Spurious -EAGAIN errors can happen and the |
17 | request needs to be resubmitted. | ||
18 | |||
19 | The MAINTAINERS changes carry no risk and we might as well include them in QEMU | ||
20 | 6.1. | ||
17 | 21 | ||
18 | ---------------------------------------------------------------- | 22 | ---------------------------------------------------------------- |
19 | 23 | ||
20 | Nishanth Aravamudan (1): | 24 | Fabian Ebner (1): |
21 | block/file-posix: add bdrv_attach_aio_context callback for host dev | 25 | block/io_uring: resubmit when result is -EAGAIN |
22 | and cdrom | ||
23 | 26 | ||
24 | block/file-posix.c | 3 +++ | 27 | Philippe Mathieu-Daudé (1): |
25 | 1 file changed, 3 insertions(+) | 28 | MAINTAINERS: Added myself as a reviewer for the NVMe Block Driver |
29 | |||
30 | Stefano Garzarella (1): | ||
31 | MAINTAINERS: add Stefano Garzarella as io_uring reviewer | ||
32 | |||
33 | MAINTAINERS | 2 ++ | ||
34 | block/io_uring.c | 16 +++++++++++++++- | ||
35 | 2 files changed, 17 insertions(+), 1 deletion(-) | ||
26 | 36 | ||
27 | -- | 37 | -- |
28 | 2.17.1 | 38 | 2.31.1 |
29 | 39 | ||
30 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Stefano Garzarella <sgarzare@redhat.com> | ||
1 | 2 | ||
3 | I've been working with io_uring for a while so I'd like to help | ||
4 | with reviews. | ||
5 | |||
6 | Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> | ||
7 | Message-Id: <20210728131515.131045-1-sgarzare@redhat.com> | ||
8 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
9 | --- | ||
10 | MAINTAINERS | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/MAINTAINERS b/MAINTAINERS | ||
14 | index XXXXXXX..XXXXXXX 100644 | ||
15 | --- a/MAINTAINERS | ||
16 | +++ b/MAINTAINERS | ||
17 | @@ -XXX,XX +XXX,XX @@ Linux io_uring | ||
18 | M: Aarushi Mehta <mehta.aaru20@gmail.com> | ||
19 | M: Julia Suvorova <jusual@redhat.com> | ||
20 | M: Stefan Hajnoczi <stefanha@redhat.com> | ||
21 | +R: Stefano Garzarella <sgarzare@redhat.com> | ||
22 | L: qemu-block@nongnu.org | ||
23 | S: Maintained | ||
24 | F: block/io_uring.c | ||
25 | -- | ||
26 | 2.31.1 | ||
27 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Fabian Ebner <f.ebner@proxmox.com> | ||
1 | 2 | ||
3 | Linux SCSI can throw spurious -EAGAIN in some corner cases in its | ||
4 | completion path, which will end up being the result in the completed | ||
5 | io_uring request. | ||
6 | |||
7 | Resubmitting such requests should allow block jobs to complete, even | ||
8 | if such spurious errors are encountered. | ||
9 | |||
10 | Co-authored-by: Stefan Hajnoczi <stefanha@gmail.com> | ||
11 | Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> | ||
12 | Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> | ||
13 | Message-id: 20210729091029.65369-1-f.ebner@proxmox.com | ||
14 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
15 | --- | ||
16 | block/io_uring.c | 16 +++++++++++++++- | ||
17 | 1 file changed, 15 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/block/io_uring.c b/block/io_uring.c | ||
20 | index XXXXXXX..XXXXXXX 100644 | ||
21 | --- a/block/io_uring.c | ||
22 | +++ b/block/io_uring.c | ||
23 | @@ -XXX,XX +XXX,XX @@ static void luring_process_completions(LuringState *s) | ||
24 | total_bytes = ret + luringcb->total_read; | ||
25 | |||
26 | if (ret < 0) { | ||
27 | - if (ret == -EINTR) { | ||
28 | + /* | ||
29 | + * Only writev/readv/fsync requests on regular files or host block | ||
30 | + * devices are submitted. Therefore -EAGAIN is not expected but it's | ||
31 | + * known to happen sometimes with Linux SCSI. Submit again and hope | ||
32 | + * the request completes successfully. | ||
33 | + * | ||
34 | + * For more information, see: | ||
35 | + * https://lore.kernel.org/io-uring/20210727165811.284510-3-axboe@kernel.dk/T/#u | ||
36 | + * | ||
37 | + * If the code is changed to submit other types of requests in the | ||
38 | + * future, then this workaround may need to be extended to deal with | ||
39 | + * genuine -EAGAIN results that should not be resubmitted | ||
40 | + * immediately. | ||
41 | + */ | ||
42 | + if (ret == -EINTR || ret == -EAGAIN) { | ||
43 | luring_resubmit(s, luringcb); | ||
44 | continue; | ||
45 | } | ||
46 | -- | ||
47 | 2.31.1 | ||
48 | diff view generated by jsdifflib |
1 | From: Nishanth Aravamudan <naravamudan@digitalocean.com> | 1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> |
---|---|---|---|
2 | 2 | ||
3 | In ed6e2161 ("linux-aio: properly bubble up errors from initialzation"), | 3 | I'm interested in following the activity around the NVMe bdrv. |
4 | I only added a bdrv_attach_aio_context callback for the bdrv_file | ||
5 | driver. There are several other drivers that use the shared | ||
6 | aio_plug callback, though, and they will trip the assertion added to | ||
7 | aio_get_linux_aio because they did not call aio_setup_linux_aio first. | ||
8 | Add the appropriate callback definition to the affected driver | ||
9 | definitions. | ||
10 | 4 | ||
11 | Fixes: ed6e2161 ("linux-aio: properly bubble up errors from initialization") | 5 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
12 | Reported-by: Farhan Ali <alifm@linux.ibm.com> | 6 | Message-id: 20210728183340.2018313-1-philmd@redhat.com |
13 | Signed-off-by: Nishanth Aravamudan <naravamudan@digitalocean.com> | ||
14 | Reviewed-by: John Snow <jsnow@redhat.com> | ||
15 | Message-id: 20180718211256.29774-1-naravamudan@digitalocean.com | ||
16 | Cc: Eric Blake <eblake@redhat.com> | ||
17 | Cc: Kevin Wolf <kwolf@redhat.com> | ||
18 | Cc: John Snow <jsnow@redhat.com> | ||
19 | Cc: Max Reitz <mreitz@redhat.com> | ||
20 | Cc: Stefan Hajnoczi <stefanha@redhat.com> | ||
21 | Cc: Fam Zheng <famz@redhat.com> | ||
22 | Cc: Paolo Bonzini <pbonzini@redhat.com> | ||
23 | Cc: qemu-block@nongnu.org | ||
24 | Cc: qemu-devel@nongnu.org | ||
25 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 7 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
26 | --- | 8 | --- |
27 | block/file-posix.c | 3 +++ | 9 | MAINTAINERS | 1 + |
28 | 1 file changed, 3 insertions(+) | 10 | 1 file changed, 1 insertion(+) |
29 | 11 | ||
30 | diff --git a/block/file-posix.c b/block/file-posix.c | 12 | diff --git a/MAINTAINERS b/MAINTAINERS |
31 | index XXXXXXX..XXXXXXX 100644 | 13 | index XXXXXXX..XXXXXXX 100644 |
32 | --- a/block/file-posix.c | 14 | --- a/MAINTAINERS |
33 | +++ b/block/file-posix.c | 15 | +++ b/MAINTAINERS |
34 | @@ -XXX,XX +XXX,XX @@ static BlockDriver bdrv_host_device = { | 16 | @@ -XXX,XX +XXX,XX @@ F: block/null.c |
35 | .bdrv_refresh_limits = raw_refresh_limits, | 17 | NVMe Block Driver |
36 | .bdrv_io_plug = raw_aio_plug, | 18 | M: Stefan Hajnoczi <stefanha@redhat.com> |
37 | .bdrv_io_unplug = raw_aio_unplug, | 19 | R: Fam Zheng <fam@euphon.net> |
38 | + .bdrv_attach_aio_context = raw_aio_attach_aio_context, | 20 | +R: Philippe Mathieu-Daudé <philmd@redhat.com> |
39 | 21 | L: qemu-block@nongnu.org | |
40 | .bdrv_co_truncate = raw_co_truncate, | 22 | S: Supported |
41 | .bdrv_getlength = raw_getlength, | 23 | F: block/nvme* |
42 | @@ -XXX,XX +XXX,XX @@ static BlockDriver bdrv_host_cdrom = { | ||
43 | .bdrv_refresh_limits = raw_refresh_limits, | ||
44 | .bdrv_io_plug = raw_aio_plug, | ||
45 | .bdrv_io_unplug = raw_aio_unplug, | ||
46 | + .bdrv_attach_aio_context = raw_aio_attach_aio_context, | ||
47 | |||
48 | .bdrv_co_truncate = raw_co_truncate, | ||
49 | .bdrv_getlength = raw_getlength, | ||
50 | @@ -XXX,XX +XXX,XX @@ static BlockDriver bdrv_host_cdrom = { | ||
51 | .bdrv_refresh_limits = raw_refresh_limits, | ||
52 | .bdrv_io_plug = raw_aio_plug, | ||
53 | .bdrv_io_unplug = raw_aio_unplug, | ||
54 | + .bdrv_attach_aio_context = raw_aio_attach_aio_context, | ||
55 | |||
56 | .bdrv_co_truncate = raw_co_truncate, | ||
57 | .bdrv_getlength = raw_getlength, | ||
58 | -- | 24 | -- |
59 | 2.17.1 | 25 | 2.31.1 |
60 | 26 | ||
61 | diff view generated by jsdifflib |