Re: [PATCHv2] util: storage: Invert the way recursive metadata retrieval works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/23/2014 03:19 PM, Peter Krempa wrote:
> To avoid having the root of a backing chain present twice in the list we
> need to invert the working of virStorageFileGetMetadataRecurse.
> 
> Until now the recursive worker created a new backing chain element from
> the name and other information passed as arguments. This required us to
> pass the data of the parent in a deconstructed way and the worker
> created a new entry for the parent.
> 
> This patch converts this function so that it just fills in metadata
> about the parent and creates a backing chain element from those. This
> removes the duplication of the first element.
> 
> To avoid breaking the test suite, virstoragetest now calls a wrapper
> that creates the parent structure explicitly and pre-fills it with the
> test data with same function signature as previously used.
> ---
>  src/conf/domain_conf.c        |   5 +-
>  src/qemu/qemu_domain.c        |  12 ++-
>  src/qemu/qemu_driver.c        |   6 +-
>  src/security/virt-aa-helper.c |   7 +-
>  src/util/virstoragefile.c     | 193 ++++++++++++++++++++++--------------------
>  src/util/virstoragefile.h     |   7 +-
>  tests/virstoragetest.c        |  55 ++++++++++--
>  7 files changed, 162 insertions(+), 123 deletions(-)
> 


> +
> +    if (virStorageFileGetMetadataRecurse(backingStore,
> +                                         backingStore->path,
> +                                         uid, gid, allow_probe,
> +                                         cycle) < 0) {
> +        /* if we fail somewhere midway, just accept the and return a

s/the //

ACK

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]