[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] aio-posix: disable polling after aio_disable_external()
From: |
Paolo Bonzini |
Subject: |
[PATCH 1/3] aio-posix: disable polling after aio_disable_external() |
Date: |
Wed, 5 Apr 2023 18:17:50 +0200 |
Polling can cause external requests to be picked up even if the AioContext
is not looking at external file descriptors. Disable all polling between
aio_disable_external() and aio_enable_external(), since aio_set_fd_poll()
does not distinguish external handlers from those that in principle could
run.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
util/aio-posix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/aio-posix.c b/util/aio-posix.c
index a8be940f760d..0d22e3d6d37c 100644
--- a/util/aio-posix.c
+++ b/util/aio-posix.c
@@ -29,7 +29,7 @@
bool aio_poll_disabled(AioContext *ctx)
{
- return qatomic_read(&ctx->poll_disable_cnt);
+ return qatomic_read(&ctx->poll_disable_cnt) ||
qatomic_read(&ctx->external_disable_cnt);
}
void aio_add_ready_handler(AioHandlerList *ready_list,
--
2.39.2