qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 15/17] mirror: Release AioCtx before queue_restart_a


From: Max Reitz
Subject: [Qemu-devel] [PATCH 15/17] mirror: Release AioCtx before queue_restart_all()
Date: Mon, 13 Aug 2018 04:20:04 +0200

Calling qemu_co_queue_restart_all() with a held AioContext looks a bit
strange.  There is no reason why we would hold the context any longer
(as this coroutine is not going to perform any further operations that
would necessitate it), so release it before restarting the waiting
requests.

Signed-off-by: Max Reitz <address@hidden>
---
 block/mirror.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/mirror.c b/block/mirror.c
index 053c37b6a6..cba7de610e 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -395,10 +395,10 @@ static void coroutine_fn mirror_co_perform(void *opaque)
         }
     }
 
+    aio_context_release(aio_context);
+
     qemu_co_queue_restart_all(&op->waiting_requests);
     g_free(op);
-
-    aio_context_release(aio_context);
 }
 
 /* If mirror_method == MIRROR_METHOD_COPY, *offset and *bytes will be
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]