From: Fam Zheng Date: Thu, 9 Aug 2018 13:22:58 +0000 (+0800) Subject: aio-posix: Don't count ctx->notifier as progress when polling X-Git-Tag: v3.0.1~85 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=98f6f212614636792699bd010e6c4ea379f0f2e4;p=thirdparty%2Fqemu.git aio-posix: Don't count ctx->notifier as progress when polling The same logic exists in fd polling. This change is especially important to avoid busy loop once we limit aio_notify_accept() to blocking aio_poll(). Cc: qemu-stable@nongnu.org Signed-off-by: Fam Zheng Message-Id: <20180809132259.18402-2-famz@redhat.com> Signed-off-by: Fam Zheng (cherry picked from commit 70232b5253a3c4e03ed1ac47ef9246a8ac66c6fa) Signed-off-by: Michael Roth --- diff --git a/util/aio-posix.c b/util/aio-posix.c index 118bf5784b8..b5c7f463aa0 100644 --- a/util/aio-posix.c +++ b/util/aio-posix.c @@ -494,7 +494,8 @@ static bool run_poll_handlers_once(AioContext *ctx) QLIST_FOREACH_RCU(node, &ctx->aio_handlers, node) { if (!node->deleted && node->io_poll && aio_node_check(ctx, node->is_external) && - node->io_poll(node->opaque)) { + node->io_poll(node->opaque) && + node->opaque != &ctx->notifier) { progress = true; }