In a few API implementations, we use virDomainLiveConfigHelperMethod
to check the VIR_DOMAIN_AFFECT_* flags (and change the flags variable
to either AFFECT_LIVE or AFFECT_CONFIG if AFFECT_CURRENT was requested)
and optionally give us a pointer to the persistent definition.
This function can also create the persistent definition in vm->newDef
for a live domain if it does not exist yet. This cannot be the case
in LXC driver because we create it unconditionally on domain startup.
By switching to virDomainObjGetDefs we do not need to pass virCaps
and virDomainXMLOption (because the defintion does not need to be copied).
Also, instead of altering the flags, it fills the pointers to live and persistent
definitions depending on which one was requested to be modified,
making the code easier to read for static analyzers.
Ján Tomko (9):
lxc: rename vmdef to persistentDef
Use virDomainObjGetDefs in lxcDomainSetMemoryFlags
Use virDomainObjGetDefs in lxcDomainSetSchedulerParametersFlags
Use virDomainObjGetDefs in lxcDomainGetSchedulerParametersFlags
Use virDomainObjGetDefs in lxcDomainGetMemoryParameters
Use virDomainObjGetDefs in lxcDomainSetBlkioParameters
Use virDomainObjGetDefs in lxcDomainGetBlkioParameters
Export virDomainGetBlkioParametersAssignFromDef
lxc: simplify lxcDomainGetBlkioParameters
src/conf/domain_conf.c | 51 +++++
src/conf/domain_conf.h | 6 +
src/libvirt_private.syms | 1 +
src/lxc/lxc_driver.c | 511 +++++++++--------------------------------------
src/qemu/qemu_driver.c | 59 +-----
5 files changed, 154 insertions(+), 474 deletions(-)
--
2.7.3