mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00: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:
parent
01270a9a5f
commit
a887da529c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user