]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block: mark aio_poll as non-coroutine
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 8 Sep 2023 07:54:58 +0000 (09:54 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 20 Sep 2023 15:46:16 +0000 (17:46 +0200)
It is forbidden to block on the event loop during a coroutine, as that
can cause deadlocks due to recursive locking.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20230908075458.527013-1-pbonzini@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
include/block/aio.h

index bcc165c974a74647b80bbd5116f727f5413035cb..f08b3580778da8bebb6265985cc7fc4eceecf33e 100644 (file)
@@ -467,7 +467,7 @@ void aio_dispatch(AioContext *ctx);
  * or more AIO events have completed, to ensure something has moved
  * before returning.
  */
-bool aio_poll(AioContext *ctx, bool blocking);
+bool no_coroutine_fn aio_poll(AioContext *ctx, bool blocking);
 
 /* Register a file descriptor and associated callbacks.  Behaves very similarly
  * to qemu_set_fd_handler.  Unlike qemu_set_fd_handler, these callbacks will