|
|
a41c76 |
From 830d5044f0069e3e34e826d27478c9a19503adcf Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <830d5044f0069e3e34e826d27478c9a19503adcf@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Tue, 4 Feb 2020 15:07:36 +0100
|
|
|
a41c76 |
Subject: [PATCH] qemu: blockcopy: Actually unplug unused images when mirror
|
|
|
a41c76 |
job fails to start
|
|
|
a41c76 |
MIME-Version: 1.0
|
|
|
a41c76 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a41c76 |
Content-Transfer-Encoding: 8bit
|
|
|
a41c76 |
|
|
|
a41c76 |
If a mirror job fails to start in -blockdev mode we'd not unplug the
|
|
|
a41c76 |
backing files we added first because the code on the error path checked
|
|
|
a41c76 |
the wrong value. 'rc' is used as status of the code which added the
|
|
|
a41c76 |
images, but the state of the 'block(dev)-mirror' call is stored in 'ret'
|
|
|
a41c76 |
at that point.
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit 623366d13066174e60067fa763ddc2c3d1db20ef)
|
|
|
a41c76 |
|
|
|
a41c76 |
https://bugzilla.redhat.com/show_bug.cgi?id=1792195
|
|
|
a41c76 |
Message-Id: <5e9e1dd3db0f3137079f2fb29974778f8cf32879.1580824112.git.pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
src/qemu/qemu_driver.c | 2 +-
|
|
|
a41c76 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
|
a41c76 |
index 6163b13e91..83f24d7231 100644
|
|
|
a41c76 |
--- a/src/qemu/qemu_driver.c
|
|
|
a41c76 |
+++ b/src/qemu/qemu_driver.c
|
|
|
a41c76 |
@@ -18415,7 +18415,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
|
|
|
a41c76 |
qemuBlockJobStarted(job, vm);
|
|
|
a41c76 |
|
|
|
a41c76 |
endjob:
|
|
|
a41c76 |
- if (rc < 0 &&
|
|
|
a41c76 |
+ if (ret < 0 &&
|
|
|
a41c76 |
virDomainObjIsActive(vm) &&
|
|
|
a41c76 |
(data || crdata)) {
|
|
|
a41c76 |
qemuDomainObjEnterMonitor(driver, vm);
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.25.0
|
|
|
a41c76 |
|