You need to sign in or sign up before continuing.
提交 623366d1 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 6d786f95
...@@ -18413,7 +18413,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm, ...@@ -18413,7 +18413,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
qemuBlockJobStarted(job, vm); qemuBlockJobStarted(job, vm);
endjob: endjob:
if (rc < 0 && if (ret < 0 &&
virDomainObjIsActive(vm) && virDomainObjIsActive(vm) &&
(data || crdata)) { (data || crdata)) {
qemuDomainObjEnterMonitor(driver, vm); qemuDomainObjEnterMonitor(driver, vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册