]> xenbits.xensource.com Git - libvirt.git/commit
storage: Convert virStoragePoolObjList to use virObjectRWLockable
authorJohn Ferlan <jferlan@redhat.com>
Mon, 9 Oct 2017 17:34:45 +0000 (13:34 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 13 Dec 2017 20:05:10 +0000 (15:05 -0500)
commit4b2e0ed6e3fad73749f3a5ff196411378d312977
tree80553ef7bb5b95d0ee879581095bf4028750f1fd
parent90e65353a27588c22d46f26c40f23b31ef3c3ee0
storage: Convert virStoragePoolObjList to use virObjectRWLockable

Now that we have a private storage pool list, we can take the next
step and convert to using objects. In this case, we're going to use
RWLockable objects (just like every other driver) with two hash
tables for lookup by UUID or Name.

Along the way the ForEach and Search API's will be adjusted to use
the related Hash API's and the various FindBy functions altered and
augmented to allow for HashLookup w/ and w/o the pool lock already
taken.

After virStoragePoolObjRemove we will need to virObjectUnref(obj)
after to indicate the caller is "done" with it's reference. The
Unlock occurs during the Remove.

The NumOf, GetNames, and Export functions all have their own callback
functions to return the required data and the FindDuplicate code
can use the HashSearch function callbacks.
src/conf/virstorageobj.c
src/conf/virstorageobj.h
src/libvirt_private.syms
src/storage/storage_driver.c
src/test/test_driver.c