block: mark aio_poll as non-coroutine
PATCH 1/1 block: mark aio_poll as non-coroutine
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 <[email protected]>
--- include/block/aio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/block/aio.h +1 -1
@@ -468,7 +468,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
Signature · 1 line
2.41.0
Quoted 13 lines · Paolo Bonzini
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 <[email protected]>--- include/block/aio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/block/aio.h +0
-0
include/block/aio.h void aio_dispatch(AioContext *ctx); · line 474
Quoted 8 lines
include/block/aio.h +1
-1@@ -468,7 +468,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
Reviewed-by Michael Tokarev <[email protected]>
While this is a no-op change for the code and trivial syntactically, I'm skeptical it should go through trivial-patches@.
/mjt
Kevin Wolf
AppliedAm 08.09.2023 um 09:54 hat Paolo Bonzini geschrieben:
Quoted 4 lines
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 <[email protected]>
Thanks, applied to the block branch.
Kevin