[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/33] commit: Add 'base' to the reopen queue before
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 09/33] commit: Add 'base' to the reopen queue before 'overlay_bs' |
Date: |
Thu, 22 Sep 2016 18:29:10 +0200 |
From: Alberto Garcia <address@hidden>
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>
Signed-off-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 a02539b..9f67a8b 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -242,14 +242,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) {
--
1.8.3.1
- [Qemu-devel] [PULL 00/33] Block layer patches, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 01/33] qcow2: fix encryption during cow of sectors, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 02/33] hmp: Remove dead code in hmp_qemu_io(), Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 04/33] block: Remove bdrv_is_snapshot, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 05/33] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 03/33] tests: allow to specify list of formats to test for check-block.sh, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 06/33] block: Update bs->open_flags earlier in bdrv_open_common(), Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 08/33] block: Don't queue the same BDS twice in bdrv_reopen_queue_child(), Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 10/33] block: rename "read-only" to BDRV_OPT_READ_ONLY, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 07/33] block: Add "read-only" to the options QDict, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 09/33] commit: Add 'base' to the reopen queue before 'overlay_bs',
Kevin Wolf <=
- [Qemu-devel] [PULL 11/33] block: Fix 'since' for compressed Drive/BlockdevBackup, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 13/33] qdev-monitor: Factor out find_device_state(), Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 12/33] block: Add blk_by_dev(), Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 14/33] qdev-monitor: Add blk_by_qdev_id(), Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 16/33] block: Accept device model name for x-blockdev-insert-medium, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 15/33] block: Accept device model name for blockdev-open/close-tray, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 17/33] block: Accept device model name for x-blockdev-remove-medium, Kevin Wolf, 2016/09/22
- [Qemu-devel] [PULL 18/33] block: Accept device model name for eject, Kevin Wolf, 2016/09/22