mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: fix block{commit,copy} abort handling
When a block{commit,copy} job was aborted on a domain, block job handler did not process it correctly, leaving a phantom job in the background. Any further calls to any blockjob causes "block <jobtype> still active" error. This patch fixes the blockjob handler so that it checks not only for VIR_DOMAIN_BLOCK_JOB_FAILED status, but VIR_DOMAIN_BLOCK_JOB_CANCELED status as well, followed by our existing cleanup routine. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1135169 Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
111198210b
commit
8e23e0e977
@ -1104,7 +1104,8 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
if (status == VIR_DOMAIN_BLOCK_JOB_READY) {
|
||||
disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_READY;
|
||||
save = true;
|
||||
} else if (status == VIR_DOMAIN_BLOCK_JOB_FAILED) {
|
||||
} else if (status == VIR_DOMAIN_BLOCK_JOB_FAILED ||
|
||||
status == VIR_DOMAIN_BLOCK_JOB_CANCELED) {
|
||||
virStorageSourceFree(disk->mirror);
|
||||
disk->mirror = NULL;
|
||||
disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_NONE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user