Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_migration.c | 8 +++----- src/qemu/qemu_migration.h | 3 +-- src/qemu/qemu_snapshot.c | 4 ++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bd8c907567..37bdc81378 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2624,7 +2624,7 @@ qemuDomainSaveInternal(virQEMUDriver *driver, VIR_DOMAIN_JOB_OPERATION_SAVE, flags) < 0) goto cleanup; - if (!qemuMigrationSrcIsAllowed(driver, vm, false, VIR_ASYNC_JOB_SAVE, 0)) + if (!qemuMigrationSrcIsAllowed(vm, false, VIR_ASYNC_JOB_SAVE, 0)) goto endjob; if (!virDomainObjIsActive(vm)) { @@ -3129,7 +3129,7 @@ doCoreDump(virQEMUDriver *driver, goto cleanup; } - if (!qemuMigrationSrcIsAllowed(driver, vm, false, VIR_ASYNC_JOB_DUMP, 0)) + if (!qemuMigrationSrcIsAllowed(vm, false, VIR_ASYNC_JOB_DUMP, 0)) goto cleanup; if (qemuMigrationSrcToFile(driver, vm, fd, compressor, diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 61a2bc39c4..a561e1bc63 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1358,7 +1358,6 @@ qemuDomainGetMigrationBlockers(virDomainObj *vm, /** * qemuMigrationSrcIsAllowed: - * @driver: qemu driver struct * @vm: domain object * @remote: migration is remote * @flags: migration flags (see struct virDomainMigrateFlags) @@ -1371,8 +1370,7 @@ qemuDomainGetMigrationBlockers(virDomainObj *vm, * false otherwise. */ bool -qemuMigrationSrcIsAllowed(virQEMUDriver *driver G_GNUC_UNUSED, - virDomainObj *vm, +qemuMigrationSrcIsAllowed(virDomainObj *vm, bool remote, int asyncJob, unsigned int flags) @@ -2546,7 +2544,7 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver, qemuMigrationJobStartPhase(vm, QEMU_MIGRATION_PHASE_BEGIN3) < 0) return NULL; - if (!qemuMigrationSrcIsAllowed(driver, vm, true, vm->job->asyncJob, flags)) + if (!qemuMigrationSrcIsAllowed(vm, true, vm->job->asyncJob, flags)) return NULL; if (!(flags & (VIR_MIGRATE_UNSAFE | VIR_MIGRATE_OFFLINE)) && @@ -6034,7 +6032,7 @@ qemuMigrationSrcPerformJob(virQEMUDriver *driver, if (!(flags & VIR_MIGRATE_OFFLINE) && virDomainObjCheckActive(vm) < 0) goto endjob; - if (!qemuMigrationSrcIsAllowed(driver, vm, true, VIR_ASYNC_JOB_MIGRATION_OUT, flags)) + if (!qemuMigrationSrcIsAllowed(vm, true, VIR_ASYNC_JOB_MIGRATION_OUT, flags)) goto endjob; if (!(flags & (VIR_MIGRATE_UNSAFE | VIR_MIGRATE_OFFLINE)) && diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h index 38a961f4e9..d21b6f67e8 100644 --- a/src/qemu/qemu_migration.h +++ b/src/qemu/qemu_migration.h @@ -226,8 +226,7 @@ qemuMigrationProcessUnattended(virQEMUDriver *driver, qemuMonitorMigrationStatus status); bool -qemuMigrationSrcIsAllowed(virQEMUDriver *driver, - virDomainObj *vm, +qemuMigrationSrcIsAllowed(virDomainObj *vm, bool remote, int asyncJob, unsigned int flags); diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index d7983c134f..8b5bcd9770 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -291,7 +291,7 @@ qemuSnapshotCreateActiveInternal(virQEMUDriver *driver, virDomainSnapshotDef *snapdef = virDomainSnapshotObjGetDef(snap); int ret = -1; - if (!qemuMigrationSrcIsAllowed(driver, vm, false, VIR_ASYNC_JOB_SNAPSHOT, 0)) + if (!qemuMigrationSrcIsAllowed(vm, false, VIR_ASYNC_JOB_SNAPSHOT, 0)) goto cleanup; if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) { @@ -1331,7 +1331,7 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *driver, /* do the memory snapshot if necessary */ if (memory) { /* check if migration is possible */ - if (!qemuMigrationSrcIsAllowed(driver, vm, false, VIR_ASYNC_JOB_SNAPSHOT, 0)) + if (!qemuMigrationSrcIsAllowed(vm, false, VIR_ASYNC_JOB_SNAPSHOT, 0)) goto cleanup; qemuDomainJobSetStatsType(vm->job->current, -- 2.38.1