[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 18/19] commit: Simplify reopen of base
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PATCH v2 18/19] commit: Simplify reopen of base |
Date: |
Thu, 21 Dec 2017 15:22:50 +0100 |
Since commit bde70715, base is the only node that is reopened in
commit_start(). This means that the code, which still involves an
explicit BlockReopenQueue, can now be simplified by using bdrv_reopen().
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
---
block/commit.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index c5327551ce..bb6c904704 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -277,7 +277,6 @@ void commit_start(const char *job_id, BlockDriverState *bs,
const char *filter_node_name, Error **errp)
{
CommitBlockJob *s;
- BlockReopenQueue *reopen_queue = NULL;
int orig_base_flags;
BlockDriverState *iter;
BlockDriverState *commit_top_bs = NULL;
@@ -299,12 +298,7 @@ void commit_start(const char *job_id, BlockDriverState *bs,
/* convert base to r/w, if necessary */
orig_base_flags = bdrv_get_flags(base);
if (!(orig_base_flags & BDRV_O_RDWR)) {
- reopen_queue = bdrv_reopen_queue(reopen_queue, base, NULL,
- orig_base_flags | BDRV_O_RDWR);
- }
-
- if (reopen_queue) {
- bdrv_reopen_multiple(bdrv_get_aio_context(bs), reopen_queue,
&local_err);
+ bdrv_reopen(base, orig_base_flags | BDRV_O_RDWR, &local_err);
if (local_err != NULL) {
error_propagate(errp, local_err);
goto fail;
--
2.13.6
- [Qemu-block] [PATCH v2 08/19] block: Don't block_job_pause_all() in bdrv_drain_all(), (continued)
- [Qemu-block] [PATCH v2 08/19] block: Don't block_job_pause_all() in bdrv_drain_all(), Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 09/19] block: Nested drain_end must still call callbacks, Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 11/19] block: Don't notify parents in drain call chain, Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 12/19] block: Add bdrv_subtree_drained_begin/end(), Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 10/19] test-bdrv-drain: Test nested drain sections, Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 13/19] test-bdrv-drain: Tests for bdrv_subtree_drain, Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 14/19] test-bdrv-drain: Test behaviour in coroutine context, Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 15/19] test-bdrv-drain: Recursive draining with multiple parents, Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 16/19] block: Allow graph changes in subtree drained section, Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 17/19] test-bdrv-drain: Test graph changes in drained section, Kevin Wolf, 2017/12/21
- [Qemu-block] [PATCH v2 18/19] commit: Simplify reopen of base,
Kevin Wolf <=
- [Qemu-block] [PATCH v2 19/19] block: Keep nodes drained between reopen_queue/multiple, Kevin Wolf, 2017/12/21