mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
qemu: Make migration params usable outside migration
So far migration parameters were changed only at the beginning of migration mostly via an automatic translation from flags and typed parameters. We need to export a few more functions to support APIs which may set migration parameters while migration is already running. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
54e969c538
commit
08d44263c8
@ -216,7 +216,7 @@ qemuMigrationParamsGetAlwaysOnCaps(qemuMigrationParty party)
|
||||
}
|
||||
|
||||
|
||||
static qemuMigrationParamsPtr
|
||||
qemuMigrationParamsPtr
|
||||
qemuMigrationParamsNew(void)
|
||||
{
|
||||
qemuMigrationParamsPtr params;
|
||||
@ -1039,6 +1039,20 @@ qemuMigrationParamsFetch(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuMigrationParamsSetULL(qemuMigrationParamsPtr migParams,
|
||||
qemuMigrationParam param,
|
||||
unsigned long long value)
|
||||
{
|
||||
if (qemuMigrationParamsCheckType(param, QEMU_MIGRATION_PARAM_TYPE_ULL) < 0)
|
||||
return -1;
|
||||
|
||||
migParams->params[param].value.ull = value;
|
||||
migParams->params[param].set = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns -1 on error,
|
||||
* 0 on success,
|
||||
|
@ -84,8 +84,12 @@ qemuMigrationParamsDump(qemuMigrationParamsPtr migParams,
|
||||
int *maxparams,
|
||||
unsigned long *flags);
|
||||
|
||||
qemuMigrationParamsPtr
|
||||
qemuMigrationParamsNew(void);
|
||||
|
||||
void
|
||||
qemuMigrationParamsFree(qemuMigrationParamsPtr migParams);
|
||||
VIR_DEFINE_AUTOPTR_FUNC(qemuMigrationParams, qemuMigrationParamsFree)
|
||||
|
||||
int
|
||||
qemuMigrationParamsApply(virQEMUDriverPtr driver,
|
||||
@ -112,6 +116,11 @@ qemuMigrationParamsFetch(virQEMUDriverPtr driver,
|
||||
int asyncJob,
|
||||
qemuMigrationParamsPtr *migParams);
|
||||
|
||||
int
|
||||
qemuMigrationParamsSetULL(qemuMigrationParamsPtr migParams,
|
||||
qemuMigrationParam param,
|
||||
unsigned long long value);
|
||||
|
||||
int
|
||||
qemuMigrationParamsGetULL(qemuMigrationParamsPtr migParams,
|
||||
qemuMigrationParam param,
|
||||
|
Loading…
x
Reference in New Issue
Block a user