
On Fri, May 19, 2017 at 08:38:16AM -0400, John Ferlan wrote:
Introduce virStoragePoolObjForEachVolume to scan each volume calling the passed callback function until all volumes have been processed in the storage pool volume list, unless the callback function returns an error.
Introduce virStoragePoolObjSearchVolume to search each volume calling the passed callback function until it returns true indicating that the desired volume was found.
Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/conf/virstorageobj.c | 32 ++++++++++++++ src/conf/virstorageobj.h | 18 ++++++++ src/libvirt_private.syms | 2 + src/storage/storage_backend_disk.c | 90 +++++++++++++++++++++++--------------- 4 files changed, 107 insertions(+), 35 deletions(-)
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>