'block-job-cancel' has one very important semantic difference to 'job-cancel', docummented in qemu as: Note that if you issue 'block-job-cancel' after 'drive-mirror' has indicated (via the event BLOCK_JOB_READY) that the source and destination are synchronized, then the event triggered by this command changes to BLOCK_JOB_COMPLETED, to indicate that the mirroring has ended and the destination now has a point-in-time copy tied to the time of the cancellation. Since libvirt advertises the block copy job as having the synchronous abort feature we must not use 'job-cancel' here. Fixes: 4817b5ca1d0 Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7a9ad03489..c90d52edc0 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14461,7 +14461,6 @@ qemuDomainBlockJobAbort(virDomainPtr dom, g_autoptr(qemuBlockJobData) job = NULL; virDomainObj *vm; qemuDomainObjPrivate *priv = NULL; - bool blockdev = false; int ret = -1; virCheckFlags(VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC | @@ -14489,7 +14488,6 @@ qemuDomainBlockJobAbort(virDomainPtr dom, } priv = vm->privateData; - blockdev = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV); if (job->state == QEMU_BLOCKJOB_STATE_ABORTING || job->state == QEMU_BLOCKJOB_STATE_PIVOTING) { @@ -14507,10 +14505,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom, goto endjob; } else { qemuDomainObjEnterMonitor(driver, vm); - if (blockdev) - ret = qemuMonitorJobCancel(priv->mon, job->name, false); - else - ret = qemuMonitorBlockJobCancel(priv->mon, job->name, false); + ret = qemuMonitorBlockJobCancel(priv->mon, job->name, false); if (qemuDomainObjExitMonitor(driver, vm) < 0) { ret = -1; goto endjob; -- 2.30.2