On 06/06/2016 04:08 AM, Ján Tomko wrote: > 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(-) > In patch 9 you could reference commit id '9f50f6e28' ... although it's also possible to figure it out with a bit of work... Should lxcDomainSetMemoryParameters get the same virDomainObjGetDefs usage? ACK series - just adjust patch 5 to remove the caps. John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list