Block patches
The following changes since commit 29e0855c5af62bbb0b0b6fed792e004dad92ba95:
Merge remote-tracking branch 'remotes/elmarco/tags/slirp-pull-request' into staging (2020-03-22 21:00:38 +0000)
are available in the Git repository at:
https://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to ff807d559205a434fd37d3343f01a0ab128bd190:
aio-posix: fix io_uring with external events (2020-03-23 11:05:44 +0000)
----------------------------------------------------------------
Pull request
----------------------------------------------------------------
Stefan Hajnoczi (1):
aio-posix: fix io_uring with external events
util/fdmon-io_uring.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
Signature · 1 line
2.24.1
[PULL for-5.0 1/1] aio-posix: fix io_uring with external events
When external event sources are disabled fdmon-io_uring falls back to fdmon-poll. The ->need_wait() callback needs to watch for this so it can return true when external event sources are disabled.
It is also necessary to call ->wait() when AioHandlers have changed because io_uring is asynchronous and we must submit new sqes.
Both of these changes to ->need_wait() together fix tests/test-aio -p /aio/external-client, which failed with:
test-aio: tests/test-aio.c:404: test_aio_external_client: Assertion `aio_poll(ctx, false)' failed.
Message-id: [email protected]
--- util/fdmon-io_uring.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
util/fdmon-io_uring.c +12 -1
@@ -290,7 +290,18 @@ static int fdmon_io_uring_wait(AioContext *ctx, AioHandlerList *ready_list,static bool fdmon_io_uring_need_wait (AioContext *ctx) { -return io_uring_cq_ready (&ctx->fdmon_io_uring); +/* Have io_uring events completed? */ +if (io_uring_cq_ready (&ctx->fdmon_io_uring)) { +return true; + } + +/* Do we need to submit new io_uring sqes? */ +if (!QSLIST_EMPTY_RCU (&ctx->submit_list)) { +return true; + } + +/* Are we falling back to fdmon-poll? */ +return atomic_read (&ctx->external_disable_cnt); }static const FDMonOps fdmon_io_uring_ops = {
Signature · 1 line
2.24.1
Peter Maydell
AppliedQuoted 16 lines · Stefan Hajnoczi
The following changes since commit
29e0855c5af62bbb0b0b6fed792e004dad92ba95:Merge remote-tracking branch 'remotes/elmarco/tags/slirp-pull-request' into staging (2020-03-22 21:00:38 +0000)
are available in the Git repository at:
https://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to
ff807d559205a434fd37d3343f01a0ab128bd190:aio-posix: fix
io_uringwith external events (2020-03-23 11:05:44 +0000)----------------------------------------------------------------
Pull request
Quoted 7 lines
----------------------------------------------------------------
Stefan Hajnoczi (1):
aio-posix: fixio_uringwith external eventsutil/fdmon-io_uring.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.
-- PMM