[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/42] block/mirror: don't install backing chain on a
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PULL 05/42] block/mirror: don't install backing chain on abort |
Date: |
Tue, 25 Sep 2018 17:15:04 +0200 |
From: John Snow <address@hidden>
In cases where we abort the block/mirror job, there's no point in
installing the new backing chain before we finish aborting.
Signed-off-by: John Snow <address@hidden>
Message-id: address@hidden
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
block/mirror.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/mirror.c b/block/mirror.c
index cba555b4ef..bd3e908710 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -642,7 +642,7 @@ static void mirror_exit(Job *job)
* required before it could become a backing file of target_bs. */
bdrv_child_try_set_perm(mirror_top_bs->backing, 0, BLK_PERM_ALL,
&error_abort);
- if (s->backing_mode == MIRROR_SOURCE_BACKING_CHAIN) {
+ if (ret == 0 && s->backing_mode == MIRROR_SOURCE_BACKING_CHAIN) {
BlockDriverState *backing = s->is_none_mode ? src : s->base;
if (backing_bs(target_bs) != backing) {
bdrv_set_backing_hd(target_bs, backing, &local_err);
--
2.17.1
- [Qemu-devel] [PULL 00/42] Block patches, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 03/42] block/stream: add block job creation flags, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 05/42] block/mirror: don't install backing chain on abort,
Max Reitz <=
- [Qemu-devel] [PULL 01/42] block/commit: add block job creation flags, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 02/42] block/mirror: add block job creation flags, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 06/42] block/mirror: conservative mirror_exit refactor, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 07/42] block/stream: refactor stream to use job callbacks, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 08/42] tests/blockjob: replace Blockjob with Job, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 09/42] tests/test-blockjob: remove exit callback, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 10/42] tests/test-blockjob-txn: move .exit to .clean, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 12/42] qapi/block-commit: expose new job properties, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 11/42] jobs: remove .exit callback, Max Reitz, 2018/09/25
- [Qemu-devel] [PULL 16/42] blockdev: document transactional shortcomings, Max Reitz, 2018/09/25