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