[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 6/7] commit: Add 'base' to the reopen queue befor
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH v2 6/7] commit: Add 'base' to the reopen queue before 'overlay_bs' |
Date: |
Thu, 15 Sep 2016 17:53:04 +0300 |
Now that we're checking for duplicates in the reopen queue, there's no
need to force a specific order in which the queue is constructed so we
can revert 3db2bd5508c86a1605258bc77c9672d93b5c350e.
Since both ways of constructing the queue are now valid, this patch
doesn't have any effect on the behavior of QEMU and is not strictly
necessary. However it can help us check that the fix for the reopen
queue is robust: if it stops working properly at some point, iotest
040 will break.
Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
---
block/commit.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 553e18d..3ab5e0c 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -243,14 +243,14 @@ void commit_start(const char *job_id, BlockDriverState
*bs,
orig_overlay_flags = bdrv_get_flags(overlay_bs);
/* convert base & overlay_bs to r/w, if necessary */
- if (!(orig_overlay_flags & BDRV_O_RDWR)) {
- reopen_queue = bdrv_reopen_queue(reopen_queue, overlay_bs, NULL,
- orig_overlay_flags | BDRV_O_RDWR);
- }
if (!(orig_base_flags & BDRV_O_RDWR)) {
reopen_queue = bdrv_reopen_queue(reopen_queue, base, NULL,
orig_base_flags | BDRV_O_RDWR);
}
+ if (!(orig_overlay_flags & BDRV_O_RDWR)) {
+ reopen_queue = bdrv_reopen_queue(reopen_queue, overlay_bs, NULL,
+ orig_overlay_flags | BDRV_O_RDWR);
+ }
if (reopen_queue) {
bdrv_reopen_multiple(reopen_queue, &local_err);
if (local_err != NULL) {
--
2.9.3
- [Qemu-block] [PATCH v2 0/7] Add "read-only" to the options QDict, Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 7/7] block: rename "read-only" to BDRV_OPT_READ_ONLY, Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 5/7] block: Don't queue the same BDS twice in bdrv_reopen_queue_child(), Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 1/7] block: Remove bdrv_is_snapshot, Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 4/7] block: Add "read-only" to the options QDict, Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 6/7] commit: Add 'base' to the reopen queue before 'overlay_bs',
Alberto Garcia <=
- [Qemu-block] [PATCH v2 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 3/7] block: Update bs->open_flags earlier in bdrv_open_common(), Alberto Garcia, 2016/09/15
- Re: [Qemu-block] [PATCH v2 0/7] Add "read-only" to the options QDict, Kevin Wolf, 2016/09/16