]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Fix misc thread locking bugs / bogus warnings
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 2 Sep 2009 13:02:06 +0000 (14:02 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 10 Sep 2009 13:26:56 +0000 (14:26 +0100)
commit5c8d3d3bca1ee6e0999ebd7a045d8aef280fbe85
treee7b001da03f793c0adadd6f86f9b64c28c9f80b9
parente52d608ddf56d3334c15ff9f6b6289e2b86ca053
Fix misc thread locking bugs / bogus warnings

Fix all thread locking bugs reported by object-locking test
case.

NB, some of the driver locking is getting too coarse. Driver
mutexes really need to be turned into RW locks instead to
significantly increase concurrency.

* src/lxc_driver.c: Fix useof driver when unlocked in the methods
  lxcDomainGetInfo, lxcSetSchedulerParameters, and
  lxcGetSchedulerParameters
* src/opennebula/one_driver.c: Fix missing unlock in oneDomainUndefine.
  Fix use of driver when unlocked in oneDomainGetInfo,
  oneGetOSType, oneDomainShutdown
* src/qemu_driver.c: Fix use of driver when unlocked in
  qemudDomainSavem, qemuGetSchedulerType, qemuSetSchedulerParameters
  and qemuGetSchedulerParameters
* src/storage_driver.c: Re-work storagePoolCreate to avoid bogus
  lock checking warning. Re-work storageVolumeCreateXMLFrom to
  remove a potential NULL de-reference & avoid bogus lock check
  warnings
* src/test.c: Remove testDomainAssignDef since it break lock chekc
  warnings.
* tests/object-locking.ml: Add oneDriverLock, oneDriverUnlock
  and one_driver_t methods/types to allow lock checking on the
   OpenNebula drivers
src/lxc_driver.c
src/opennebula/one_driver.c
src/qemu_driver.c
src/storage_driver.c
src/test.c
tests/object-locking.ml