libvirt/src/qemu
Daniel P. Berrange a3adcce795 Convert virDomainObjListPtr to use a hash of domain objects
The current virDomainObjListPtr object stores domain objects in
an array. This means that to find a particular objects requires
O(n) time, and more critically acquiring O(n) mutex locks.

The new impl replaces the array with a virHashTable, keyed off
UUID. Finding a object based on UUID is now O(1) time, and only
requires a single mutex lock. Finding by name/id is unchanged
in complexity.

In changing this, all code which iterates over the array had
to be updated to use a hash table iterator function callback.
Several of the functions which were identically duplicating
across all drivers were pulled into domain_conf.c

* src/conf/domain_conf.h, src/conf/domain_conf.c: Change
  virDomainObjListPtr to use virHashTable. Add a initializer
  method virDomainObjListInit, and rename virDomainObjListFree
  to virDomainObjListDeinit, since its not actually freeing
  the container, only its contents. Also add some convenient
  methods virDomainObjListGetInactiveNames,
  virDomainObjListGetActiveIDs and virDomainObjListNumOfDomains
  which can be used to implement the correspondingly named
  public API entry points in drivers
* src/libvirt_private.syms: Export new methods from domain_conf.h
* src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
  src/openvz/openvz_conf.c, src/openvz/openvz_driver.c,
  src/qemu/qemu_driver.c, src/test/test_driver.c,
  src/uml/uml_driver.c, src/vbox/vbox_tmpl.c: Update all code
  to deal with hash tables instead of arrays for domains
2009-10-28 20:05:55 +00:00
..
libvirtd_qemu.aug Move config files to align with driver sources 2009-09-21 14:41:45 +01:00
qemu_conf.c Fix error message in qemudLoadDriverConfig() 2009-10-26 23:30:19 +01:00
qemu_conf.h Add a qemu feature flag for unix socket migration. 2009-09-30 14:06:12 +02:00
qemu_driver.c Convert virDomainObjListPtr to use a hash of domain objects 2009-10-28 20:05:55 +00:00
qemu_driver.h Move QEMU driver to src/qemu/ 2009-09-21 14:41:43 +01:00
qemu_monitor_text.c unbreak migration 2009-10-02 11:57:31 +02:00
qemu_monitor_text.h Various monitor improvements for migration. 2009-10-01 13:24:22 +02:00
qemu.conf Move config files to align with driver sources 2009-09-21 14:41:45 +01:00
test_libvirtd_qemu.aug Move config files to align with driver sources 2009-09-21 14:41:45 +01:00