]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Complete implementation volume by hash object
authorJohn Ferlan <jferlan@redhat.com>
Tue, 10 Oct 2017 22:32:40 +0000 (18:32 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 10 Jan 2018 13:10:24 +0000 (08:10 -0500)
commitbe1bb6c95b31426f98418c8b598ac5df2ebdb7fa
tree4459169d5dc65cc84afe0c5b531cd0ab305b3059
parentf77c898d1e917e1818982c6c8202b843a1a18750
storage: Complete implementation volume by hash object

Alter the volume logic to use the hash tables instead of forward
linked lists. There are three hash tables to allow for fast lookup
by name, target.path, and key.

Modify the virStoragePoolObjAddVol to place the object in all 3
tables if possible using self locking RWLock on the volumes object.
Conversely when removing the volume, it's a removal of the object
from the various hash tables.

Implement functions to handle remote ForEach and Search Volume
type helpers. These are used by the disk backend in order to
facilitate adding a primary, extended, or logical partition.

Implement the various VolDefFindBy* helpers as simple (and fast)
hash lookups. The NumOfVolumes, GetNames, and ListExport helpers
are all implemented using standard for each hash table calls.
src/conf/virstorageobj.c