1. 30 10月, 2009 5 次提交
  2. 29 10月, 2009 2 次提交
    • D
      Convert virDomainObjListPtr to use a hash of domain objects · a3adcce7
      Daniel P. Berrange 提交于
      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
      a3adcce7
    • M
      libvirt-devel should only require libvirt-client · 1acef95a
      Mark McLoughlin 提交于
      There's a long known issue where if you install libvirt in a guest,
      the default virtual network will conflict with the default virtual
      network in the host.
      
      That's one of the reasons we have the libvirt-client RPM - it allows
      you to install the client library without having the host side
      installed.
      
      Rich Jones points out that if you install libvirt-devel in a guest,
      then you get libvirtd installed and the network conflict:
      
        https://bugzilla.redhat.com/531200
      
      libvirt-devel should only require libvirt-client - e.g. nothing in
      the devel package pertains to anything in the libvirt RPM. The Fedora
      packaging guidelines say:
      
        https://fedoraproject.org/wiki/Packaging/Guidelines#Devel_Packages
      
        Devel packages must require the base package using a fully versioned
        dependency ...
      
      But for all intents and purposes, libvirt-client is our base RPM.
      
      * libvirt.spec.in: make libvirt-devel require libvirt-client
      1acef95a
  3. 28 10月, 2009 10 次提交
  4. 27 10月, 2009 4 次提交
  5. 26 10月, 2009 9 次提交
  6. 22 10月, 2009 2 次提交
    • M
      Fix potential false-positive OOM error reporting. · 4ed2c377
      Matthias Bolte 提交于
      If no matching device was found (cap == NULL) then no strdup() call
      was made and *wwnn and *wwpn are untouched. Checking them for NULL
      in this situation may result in reporting an false-positive OOM error
      because *wwnn and *wwpn may be initialized to NULL by the caller.
      
      Only check *wwnn and *wwpn for NULL if a matching device was found
      (cap != NULL) and thus strdup() was called.
      
      * src/conf/node_device_conf.c: only report an OOM error if there
        really is one
      4ed2c377
    • D
      Consolidate virXPathNodeSet() · 2f4682a9
      Daniel Veillard 提交于
      virXPathNodeSet() could return -1 when doing an evaluation failure
      due to xmlXPathEval() from libxml2 behaviour.
      * src/util/xml.c: make sure we always return 0 unless the returned
        XPath type is of the wrong type (meaning the query passed didn't
        evaluate to a node set and code must be fixed)
      2f4682a9
  7. 21 10月, 2009 8 次提交