qemu/include/io
Kevin Wolf 7c1f51bf38 nbd/server: Fix drained_poll to wake coroutine in right AioContext
nbd_drained_poll() generally runs in the main thread, not whatever
iothread the NBD server coroutine is meant to run in, so it can't
directly reenter the coroutines to wake them up.

The code seems to have the right intention, it specifies the correct
AioContext when it calls qemu_aio_coroutine_enter(). However, this
functions doesn't schedule the coroutine to run in that AioContext, but
it assumes it is already called in the home thread of the AioContext.

To fix this, add a new thread-safe qio_channel_wake_read() that can be
called in the main thread to wake up the coroutine in its AioContext,
and use this in nbd_drained_poll().

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230517152834.277483-3-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-05-19 19:16:53 +02:00
..
channel-buffer.h io: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
channel-command.h io/command: implement support for win32 2022-10-12 19:22:01 +04:00
channel-file.h io: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
channel-null.h io: add a QIOChannelNull equivalent to /dev/null 2022-06-22 18:11:21 +01:00
channel-socket.h QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX 2022-05-16 13:56:24 +01:00
channel-tls.h io: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
channel-util.h io: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
channel-watch.h io: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
channel-websock.h io: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
channel.h nbd/server: Fix drained_poll to wake coroutine in right AioContext 2023-05-19 19:16:53 +02:00
dns-resolver.h io: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
net-listener.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
task.h io: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00