mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user