Skip to content

Commit

Permalink
block: mark aio_poll as non-coroutine
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bonzini authored and kevmw committed Sep 20, 2023
1 parent 0f86afd commit c428b39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/block/aio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c428b39

Please sign in to comment.