[libvirt] [PATCH 14/19] storage: Introduce storage volume add, delete, count APIs

Pavel Hrdina phrdina at redhat.com
Fri Jul 14 15:18:47 UTC 2017


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 at redhat.com>
> ---
>  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 at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170714/a8c230a5/attachment-0001.sig>


More information about the libvir-list mailing list