mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
qemu: blockcopy: Actually unplug unused images when mirror job fails to start
If a mirror job fails to start in -blockdev mode we'd not unplug the backing files we added first because the code on the error path checked the wrong value. 'rc' is used as status of the code which added the images, but the state of the 'block(dev)-mirror' call is stored in 'ret' at that point. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
6d786f95a3
commit
623366d130
@ -18413,7 +18413,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
|
||||
qemuBlockJobStarted(job, vm);
|
||||
|
||||
endjob:
|
||||
if (rc < 0 &&
|
||||
if (ret < 0 &&
|
||||
virDomainObjIsActive(vm) &&
|
||||
(data || crdata)) {
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
|
Loading…
x
Reference in New Issue
Block a user