Dario Faggioli
7d60d93b26
- Fixes bsc#1204082 * Patches added: block-io_uring-revert-Use-io_uring_regis.patch - Due to change in where some documentation files are, if qemu-guest-agent is installed, we need to make sure we update it to our version (bsc#1203995) - The links in the forsplit dirs, in each subpackage, born to deal with package & subpackage splitting, are not really used. In fact, they're "Provides:"-ed by a bunch of subpackages, but there's no "Requires:" for any of them. Let's just get rid of them. OBS-URL: https://build.opensuse.org/request/show/1008823 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=737
80 lines
2.7 KiB
Diff
80 lines
2.7 KiB
Diff
From: Sam Li <faithilikerun@gmail.com>
|
|
Date: Sat, 24 Sep 2022 22:48:15 +0800
|
|
Subject: block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd
|
|
operations"
|
|
|
|
Git-commit: 0000000000000000000000000000000000000000
|
|
References: bsc#1204082
|
|
|
|
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1193
|
|
|
|
The commit "Use io_uring_register_ring_fd() to skip fd operations" broke
|
|
when booting a guest with iothread and io_uring. That is because the
|
|
io_uring_register_ring_fd() call is made from the main thread instead of
|
|
IOThread where io_uring_submit() is called. It can not be guaranteed
|
|
to register the ring fd in the correct thread or unregister the same ring
|
|
fd if the IOThread is disabled. This optimization is not critical so we
|
|
will revert previous commit.
|
|
|
|
This reverts commit e2848bc574fe2715c694bf8fe9a1ba7f78a1125a
|
|
and 77e3f038af1764983087e3551a0fde9951952c4d.
|
|
|
|
Signed-off-by: Sam Li <faithilikerun@gmail.com>
|
|
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
|
|
---
|
|
block/io_uring.c | 13 +------------
|
|
meson.build | 1 -
|
|
2 files changed, 1 insertion(+), 13 deletions(-)
|
|
|
|
diff --git a/block/io_uring.c b/block/io_uring.c
|
|
index a1760152e0581c279e22b1c3a8d0..973e15d87693370dd3388f511962 100644
|
|
--- a/block/io_uring.c
|
|
+++ b/block/io_uring.c
|
|
@@ -11,7 +11,6 @@
|
|
#include "qemu/osdep.h"
|
|
#include <liburing.h>
|
|
#include "block/aio.h"
|
|
-#include "qemu/error-report.h"
|
|
#include "qemu/queue.h"
|
|
#include "block/block.h"
|
|
#include "block/raw-aio.h"
|
|
@@ -19,7 +18,6 @@
|
|
#include "qapi/error.h"
|
|
#include "trace.h"
|
|
|
|
-
|
|
/* io_uring ring size */
|
|
#define MAX_ENTRIES 128
|
|
|
|
@@ -432,17 +430,8 @@ LuringState *luring_init(Error **errp)
|
|
}
|
|
|
|
ioq_init(&s->io_q);
|
|
-#ifdef CONFIG_LIBURING_REGISTER_RING_FD
|
|
- if (io_uring_register_ring_fd(&s->ring) < 0) {
|
|
- /*
|
|
- * Only warn about this error: we will fallback to the non-optimized
|
|
- * io_uring operations.
|
|
- */
|
|
- warn_report("failed to register linux io_uring ring file descriptor");
|
|
- }
|
|
-#endif
|
|
-
|
|
return s;
|
|
+
|
|
}
|
|
|
|
void luring_cleanup(LuringState *s)
|
|
diff --git a/meson.build b/meson.build
|
|
index 6641e86c0107906bb07d6b35d54a..265fea0648a8b651306deae60c0f 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -1805,7 +1805,6 @@ config_host_data.set('CONFIG_LIBNFS', libnfs.found())
|
|
config_host_data.set('CONFIG_LIBSSH', libssh.found())
|
|
config_host_data.set('CONFIG_LINUX_AIO', libaio.found())
|
|
config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found())
|
|
-config_host_data.set('CONFIG_LIBURING_REGISTER_RING_FD', cc.has_function('io_uring_register_ring_fd', prefix: '#include <liburing.h>', dependencies:linux_io_uring))
|
|
config_host_data.set('CONFIG_LIBPMEM', libpmem.found())
|
|
config_host_data.set('CONFIG_NUMA', numa.found())
|
|
config_host_data.set('CONFIG_OPENGL', opengl.found())
|