[libvirt] [PATCH 0/3] Do not check for domain liveness in virDomainObjSetDefTransient

Ján Tomko jtomko at redhat.com
Fri May 27 15:45:12 UTC 2016


virDomainObjSetDefTransient has an unintuitive attribute 'live':
when set to 'true', it ignores the virDomainObjIsActive test.

The most common usage is on domain startup, where most of the callers
want to create a transient definition even though the domain is not
yet active.

The only place where live=false is still required is
virDomainObjGetPersistentDef (and its usage could possibly be cleaned
up too, since it's only called in the drivers that already do SetDefTransient
on domain startup).

Split out the virDomainObjIsActive check into virDomainObjGetPersistentDef
and remove it for the rest of the callers along with the 'live' attribute.

Ján Tomko (3):
  Clean up redundant usage of virDomainObjSetDefTransient
  Check if the domain is active in virDomainObjGetPersistentDef
  Do not check for domain liveness in virDomainObjSetDefTransient

 src/conf/domain_conf.c   | 15 ++++-----------
 src/conf/domain_conf.h   |  3 +--
 src/libxl/libxl_domain.c |  3 +--
 src/lxc/lxc_process.c    |  6 +-----
 src/qemu/qemu_process.c  |  4 ++--
 src/test/test_driver.c   |  2 +-
 src/uml/uml_driver.c     |  5 ++---
 7 files changed, 12 insertions(+), 26 deletions(-)

-- 
2.7.3




More information about the libvir-list mailing list