On Tue, May 09, 2017 at 11:30:21AM -0400, John Ferlan wrote: > Create/use virStoragePoolObjAddVol in order to add volumes onto list. > > Create/use virStoragePoolObjRemoveVol in order to remove volumes from list. > > Create/use virStoragePoolObjGetVolumesCount to get count of volumes on list. > > For the storage driver, the logic alters when the volumes.obj list grows > to after we've fetched the volobj. This is an optimization of sorts, but > also doesn't "needlessly" grow the volumes.objs list and then just decr > the count if the virGetStorageVol fails. Reminder: long lines. > > Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> > --- > src/conf/virstorageobj.c | 37 ++++++++++++++++++++++++ > src/conf/virstorageobj.h | 11 +++++++ > src/libvirt_private.syms | 3 ++ > src/storage/storage_backend_disk.c | 5 ++-- > src/storage/storage_backend_gluster.c | 3 +- > src/storage/storage_backend_logical.c | 3 +- > src/storage/storage_backend_mpath.c | 3 +- > src/storage/storage_backend_rbd.c | 4 +-- > src/storage/storage_backend_sheepdog.c | 4 +-- > src/storage/storage_backend_zfs.c | 5 +--- > src/storage/storage_driver.c | 53 +++++++++------------------------- > src/storage/storage_util.c | 4 +-- > src/test/test_driver.c | 18 ++++-------- > 13 files changed, 81 insertions(+), 72 deletions(-) Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list