diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index b3b25d78b4..b8c2483326 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -6942,8 +6942,12 @@ qemuMigrationSrcToFile(virQEMUDriver *driver, virDomainObj *vm, } +/** + * This function is supposed to be used only when no other thread is watching + * the migration. + */ int -qemuMigrationSrcCancel(virDomainObj *vm) +qemuMigrationSrcCancelUnattended(virDomainObj *vm) { qemuDomainObjPrivate *priv = vm->privateData; bool storage = false; diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h index d518889c19..bbc71d118d 100644 --- a/src/qemu/qemu_migration.h +++ b/src/qemu/qemu_migration.h @@ -241,7 +241,7 @@ qemuMigrationSrcToFile(virQEMUDriver *driver, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; int -qemuMigrationSrcCancel(virDomainObj *vm); +qemuMigrationSrcCancelUnattended(virDomainObj *vm); int qemuMigrationAnyFetchStats(virDomainObj *vm, diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 32f03ff79a..4e8daf83fe 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3537,7 +3537,7 @@ qemuProcessRecoverMigrationOut(virQEMUDriver *driver, */ VIR_DEBUG("Cancelling unfinished migration of domain %s", vm->def->name); - if (qemuMigrationSrcCancel(vm) < 0) { + if (qemuMigrationSrcCancelUnattended(vm) < 0) { VIR_WARN("Could not cancel ongoing migration of domain %s", vm->def->name); }