[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
- [Qemu-devel] [PATCH 07/17] mirror: Make mirror_co_zero() nicer, (continued)
- [Qemu-devel] [PATCH 07/17] mirror: Make mirror_co_zero() nicer, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 08/17] mirror: Make mirror_co_discard() nicer, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 09/17] mirror: Lock AioContext in mirror_co_perform(), Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 10/17] mirror: Create mirror_co_alloc_qiov(), Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 11/17] mirror: Inline mirror_write_complete(), part 1, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 12/17] mirror: Put QIOV locally into mirror_co_read, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 13/17] mirror: Linearize mirror_co_read(), Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 14/17] mirror: Inline mirror_iteration_done(), Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 15/17] mirror: Release AioCtx before queue_restart_all(),
Max Reitz <=
- [Qemu-devel] [PATCH 17/17] iotests: Add test for active mirror with COR, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 16/17] mirror: Support COR with write-blocking, Max Reitz, 2018/08/12