1
The following changes since commit 3521ade3510eb5cefb2e27a101667f25dad89935:
1
The following changes since commit da1034094d375afe9e3d8ec8980550ea0f06f7e0:
2
2
3
Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-07-29' into staging (2021-07-29 13:17:20 +0100)
3
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-10-03 07:43:44 -0400)
4
4
5
are available in the Git repository at:
5
are available in the Git repository at:
6
6
7
https://gitlab.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 cc8eecd7f105a1dff5876adeb238a14696061a4a:
9
for you to fetch changes up to 9afa888ce0f816d0f2cfc95eebe4f49244c518af:
10
10
11
MAINTAINERS: Added myself as a reviewer for the NVMe Block Driver (2021-07-29 17:17:34 +0100)
11
osdep: set _FORTIFY_SOURCE=2 when optimization is enabled (2023-10-04 09:52:06 -0400)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Pull request
14
Pull request
15
15
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.
21
22
----------------------------------------------------------------
16
----------------------------------------------------------------
23
17
24
Fabian Ebner (1):
18
Daniel P. Berrangé (1):
25
block/io_uring: resubmit when result is -EAGAIN
19
osdep: set _FORTIFY_SOURCE=2 when optimization is enabled
26
20
27
Philippe Mathieu-Daudé (1):
21
meson.build | 10 ----------
28
MAINTAINERS: Added myself as a reviewer for the NVMe Block Driver
22
include/qemu/osdep.h | 4 ++++
29
23
util/coroutine-sigaltstack.c | 4 ++--
30
Stefano Garzarella (1):
24
util/coroutine-ucontext.c | 4 ++--
31
MAINTAINERS: add Stefano Garzarella as io_uring reviewer
25
4 files changed, 8 insertions(+), 14 deletions(-)
32
33
MAINTAINERS | 2 ++
34
block/io_uring.c | 16 +++++++++++++++-
35
2 files changed, 17 insertions(+), 1 deletion(-)
36
26
37
--
27
--
38
2.31.1
28
2.41.0
39
29
30
diff view generated by jsdifflib
Deleted patch
1
From: Stefano Garzarella <sgarzare@redhat.com>
2
1
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
Deleted patch
1
From: Fabian Ebner <f.ebner@proxmox.com>
2
1
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: Philippe Mathieu-Daudé <philmd@redhat.com>
1
From: Daniel P. Berrangé <berrange@redhat.com>
2
2
3
I'm interested in following the activity around the NVMe bdrv.
3
Currently we set _FORTIFY_SOURCE=2 as a compiler argument when the
4
meson 'optimization' setting is non-zero, the compiler is GCC and
5
the target is Linux.
4
6
5
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7
While the default QEMU optimization level is 2, user could override
6
Message-id: 20210728183340.2018313-1-philmd@redhat.com
8
this by setting CFLAGS="-O0" or --extra-cflags="-O0" when running
9
configure and this won't be reflected in the meson 'optimization'
10
setting. As a result we try to enable _FORTIFY_SOURCE=2 and then the
11
user gets compile errors as it only works with optimization.
12
13
Rather than trying to improve detection in meson, it is simpler to
14
just check the __OPTIMIZE__ define from osdep.h.
15
16
The comment about being incompatible with clang appears to be
17
outdated, as compilation works fine without excluding clang.
18
19
In the coroutine code we must set _FORTIFY_SOURCE=0 to stop the
20
logic in osdep.h then enabling it.
21
22
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
23
Message-id: 20231003091549.223020-1-berrange@redhat.com
7
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
24
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8
---
25
---
9
MAINTAINERS | 1 +
26
meson.build | 10 ----------
10
1 file changed, 1 insertion(+)
27
include/qemu/osdep.h | 4 ++++
28
util/coroutine-sigaltstack.c | 4 ++--
29
util/coroutine-ucontext.c | 4 ++--
30
4 files changed, 8 insertions(+), 14 deletions(-)
11
31
12
diff --git a/MAINTAINERS b/MAINTAINERS
32
diff --git a/meson.build b/meson.build
13
index XXXXXXX..XXXXXXX 100644
33
index XXXXXXX..XXXXXXX 100644
14
--- a/MAINTAINERS
34
--- a/meson.build
15
+++ b/MAINTAINERS
35
+++ b/meson.build
16
@@ -XXX,XX +XXX,XX @@ F: block/null.c
36
@@ -XXX,XX +XXX,XX @@ if 'cpp' in all_languages
17
NVMe Block Driver
37
qemu_cxxflags = ['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS'] + qemu_cflags
18
M: Stefan Hajnoczi <stefanha@redhat.com>
38
endif
19
R: Fam Zheng <fam@euphon.net>
39
20
+R: Philippe Mathieu-Daudé <philmd@redhat.com>
40
-# clang does not support glibc + FORTIFY_SOURCE (is it still true?)
21
L: qemu-block@nongnu.org
41
-if get_option('optimization') != '0' and targetos == 'linux'
22
S: Supported
42
- if cc.get_id() == 'gcc'
23
F: block/nvme*
43
- qemu_cflags += ['-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=2']
44
- endif
45
- if 'cpp' in all_languages and cxx.get_id() == 'gcc'
46
- qemu_cxxflags += ['-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=2']
47
- endif
48
-endif
49
-
50
add_project_arguments(qemu_cflags, native: false, language: 'c')
51
add_project_arguments(cc.get_supported_arguments(warn_flags), native: false, language: 'c')
52
if 'cpp' in all_languages
53
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
54
index XXXXXXX..XXXXXXX 100644
55
--- a/include/qemu/osdep.h
56
+++ b/include/qemu/osdep.h
57
@@ -XXX,XX +XXX,XX @@
58
#ifndef QEMU_OSDEP_H
59
#define QEMU_OSDEP_H
60
61
+#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ && defined __linux__
62
+# define _FORTIFY_SOURCE 2
63
+#endif
64
+
65
#include "config-host.h"
66
#ifdef NEED_CPU_H
67
#include CONFIG_TARGET
68
diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c
69
index XXXXXXX..XXXXXXX 100644
70
--- a/util/coroutine-sigaltstack.c
71
+++ b/util/coroutine-sigaltstack.c
72
@@ -XXX,XX +XXX,XX @@
73
*/
74
75
/* XXX Is there a nicer way to disable glibc's stack check for longjmp? */
76
-#ifdef _FORTIFY_SOURCE
77
#undef _FORTIFY_SOURCE
78
-#endif
79
+#define _FORTIFY_SOURCE 0
80
+
81
#include "qemu/osdep.h"
82
#include <pthread.h>
83
#include "qemu/coroutine_int.h"
84
diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c
85
index XXXXXXX..XXXXXXX 100644
86
--- a/util/coroutine-ucontext.c
87
+++ b/util/coroutine-ucontext.c
88
@@ -XXX,XX +XXX,XX @@
89
*/
90
91
/* XXX Is there a nicer way to disable glibc's stack check for longjmp? */
92
-#ifdef _FORTIFY_SOURCE
93
#undef _FORTIFY_SOURCE
94
-#endif
95
+#define _FORTIFY_SOURCE 0
96
+
97
#include "qemu/osdep.h"
98
#include <ucontext.h>
99
#include "qemu/coroutine_int.h"
24
--
100
--
25
2.31.1
101
2.41.0
26
102
103
diff view generated by jsdifflib