qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: mark aio_poll as non-coroutine
@ 2023-09-08  7:54 Paolo Bonzini
  2023-09-10  9:19 ` Michael Tokarev
  2023-09-19 16:01 ` Kevin Wolf
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2023-09-08  7:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, qemu-trivial

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>
---
 include/block/aio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/block/aio.h b/include/block/aio.h
index 32042e8905a..f1d0a37d68f 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -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
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-19 16:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-08  7:54 [PATCH] block: mark aio_poll as non-coroutine Paolo Bonzini
2023-09-10  9:19 ` Michael Tokarev
2023-09-19 16:01 ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).