From 0ff8c175f743524d83a3939b2201f3bc1245d6e6 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 30 Aug 2022 11:18:06 +0200 Subject: [PATCH] qemu: Rename qemuMigrationSrcCancel Let's call this qemuMigrationSrcCancelUnattended as the function is supposed to be used when no other thread is watching the migration. Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- src/qemu/qemu_migration.c | 6 +++++- src/qemu/qemu_migration.h | 2 +- src/qemu/qemu_process.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) 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); }