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 <mre...@redhat.com> --- 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