]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuMigrationSrcNBDCopyCancelOne: Force-cancel disk copy jobs when aborting migration
authorPeter Krempa <pkrempa@redhat.com>
Tue, 20 Apr 2021 15:08:07 +0000 (17:08 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 26 Apr 2021 15:22:52 +0000 (17:22 +0200)
We don't require that the data is consistent on the destination if
aborting the migration.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_migration.c

index accf55e41a358aa06893c4fcba6f989660b58c28..2351f89b3cc95b1513ed37c2d15b685b95d412e3 100644 (file)
@@ -749,7 +749,9 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriver *driver,
     if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
         return -1;
 
-    rv = qemuMonitorBlockJobCancel(priv->mon, job->name, false);
+    /* when we are aborting the migration we don't care about the data
+     * consistency on the destination so that we can force cancel the mirror */
+    rv = qemuMonitorBlockJobCancel(priv->mon, job->name, abortMigration);
 
     if (qemuDomainObjExitMonitor(driver, vm) < 0 || rv < 0)
         return -1;