提交 a887da52 编写于 作者: P Peter Krempa

qemu: blockjob: Properly propagate cancellation of blockjobs

qemu returns an error message in the job statistics even if the job was
cancelled to emphasize it was not successful. Libvirt didn't properly
transform it into QEMU_BLOCKJOB_STATE_CANCELLED though.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NCole Robinson <crobinso@redhat.com>
上级 01270a9a
......@@ -1313,7 +1313,8 @@ qemuBlockJobEventProcessConcluded(qemuBlockJobDataPtr job,
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
goto cleanup;
if (job->newstate == QEMU_BLOCKJOB_STATE_COMPLETED &&
if ((job->newstate == QEMU_BLOCKJOB_STATE_COMPLETED ||
job->newstate == QEMU_BLOCKJOB_STATE_FAILED) &&
job->state == QEMU_BLOCKJOB_STATE_ABORTING)
job->newstate = QEMU_BLOCKJOB_STATE_CANCELLED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册