1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

qemuMigrationSrcIsAllowed: Remove unused 'driver' argument

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Peter Krempa 2022-08-29 16:56:46 +02:00
parent aa8e187fa9
commit 8187c0ed94
4 changed files with 8 additions and 11 deletions

View File

@ -2624,7 +2624,7 @@ qemuDomainSaveInternal(virQEMUDriver *driver,
VIR_DOMAIN_JOB_OPERATION_SAVE, flags) < 0) VIR_DOMAIN_JOB_OPERATION_SAVE, flags) < 0)
goto cleanup; goto cleanup;
if (!qemuMigrationSrcIsAllowed(driver, vm, false, VIR_ASYNC_JOB_SAVE, 0)) if (!qemuMigrationSrcIsAllowed(vm, false, VIR_ASYNC_JOB_SAVE, 0))
goto endjob; goto endjob;
if (!virDomainObjIsActive(vm)) { if (!virDomainObjIsActive(vm)) {
@ -3129,7 +3129,7 @@ doCoreDump(virQEMUDriver *driver,
goto cleanup; goto cleanup;
} }
if (!qemuMigrationSrcIsAllowed(driver, vm, false, VIR_ASYNC_JOB_DUMP, 0)) if (!qemuMigrationSrcIsAllowed(vm, false, VIR_ASYNC_JOB_DUMP, 0))
goto cleanup; goto cleanup;
if (qemuMigrationSrcToFile(driver, vm, fd, compressor, if (qemuMigrationSrcToFile(driver, vm, fd, compressor,

View File

@ -1358,7 +1358,6 @@ qemuDomainGetMigrationBlockers(virDomainObj *vm,
/** /**
* qemuMigrationSrcIsAllowed: * qemuMigrationSrcIsAllowed:
* @driver: qemu driver struct
* @vm: domain object * @vm: domain object
* @remote: migration is remote * @remote: migration is remote
* @flags: migration flags (see struct virDomainMigrateFlags) * @flags: migration flags (see struct virDomainMigrateFlags)
@ -1371,8 +1370,7 @@ qemuDomainGetMigrationBlockers(virDomainObj *vm,
* false otherwise. * false otherwise.
*/ */
bool bool
qemuMigrationSrcIsAllowed(virQEMUDriver *driver G_GNUC_UNUSED, qemuMigrationSrcIsAllowed(virDomainObj *vm,
virDomainObj *vm,
bool remote, bool remote,
int asyncJob, int asyncJob,
unsigned int flags) unsigned int flags)
@ -2546,7 +2544,7 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver,
qemuMigrationJobStartPhase(vm, QEMU_MIGRATION_PHASE_BEGIN3) < 0) qemuMigrationJobStartPhase(vm, QEMU_MIGRATION_PHASE_BEGIN3) < 0)
return NULL; return NULL;
if (!qemuMigrationSrcIsAllowed(driver, vm, true, vm->job->asyncJob, flags)) if (!qemuMigrationSrcIsAllowed(vm, true, vm->job->asyncJob, flags))
return NULL; return NULL;
if (!(flags & (VIR_MIGRATE_UNSAFE | VIR_MIGRATE_OFFLINE)) && if (!(flags & (VIR_MIGRATE_UNSAFE | VIR_MIGRATE_OFFLINE)) &&
@ -6034,7 +6032,7 @@ qemuMigrationSrcPerformJob(virQEMUDriver *driver,
if (!(flags & VIR_MIGRATE_OFFLINE) && virDomainObjCheckActive(vm) < 0) if (!(flags & VIR_MIGRATE_OFFLINE) && virDomainObjCheckActive(vm) < 0)
goto endjob; 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; goto endjob;
if (!(flags & (VIR_MIGRATE_UNSAFE | VIR_MIGRATE_OFFLINE)) && if (!(flags & (VIR_MIGRATE_UNSAFE | VIR_MIGRATE_OFFLINE)) &&

View File

@ -226,8 +226,7 @@ qemuMigrationProcessUnattended(virQEMUDriver *driver,
qemuMonitorMigrationStatus status); qemuMonitorMigrationStatus status);
bool bool
qemuMigrationSrcIsAllowed(virQEMUDriver *driver, qemuMigrationSrcIsAllowed(virDomainObj *vm,
virDomainObj *vm,
bool remote, bool remote,
int asyncJob, int asyncJob,
unsigned int flags); unsigned int flags);

View File

@ -291,7 +291,7 @@ qemuSnapshotCreateActiveInternal(virQEMUDriver *driver,
virDomainSnapshotDef *snapdef = virDomainSnapshotObjGetDef(snap); virDomainSnapshotDef *snapdef = virDomainSnapshotObjGetDef(snap);
int ret = -1; int ret = -1;
if (!qemuMigrationSrcIsAllowed(driver, vm, false, VIR_ASYNC_JOB_SNAPSHOT, 0)) if (!qemuMigrationSrcIsAllowed(vm, false, VIR_ASYNC_JOB_SNAPSHOT, 0))
goto cleanup; goto cleanup;
if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) { if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
@ -1331,7 +1331,7 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *driver,
/* do the memory snapshot if necessary */ /* do the memory snapshot if necessary */
if (memory) { if (memory) {
/* check if migration is possible */ /* 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; goto cleanup;
qemuDomainJobSetStatsType(vm->job->current, qemuDomainJobSetStatsType(vm->job->current,