]> xenbits.xensource.com Git - libvirt.git/commit
util: storage: Invert the way recursive metadata retrieval works
authorPeter Krempa <pkrempa@redhat.com>
Fri, 18 Apr 2014 12:49:54 +0000 (14:49 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 24 Apr 2014 12:27:57 +0000 (14:27 +0200)
commit8823272d41a259c1246c05d89f40ad3614fba58c
tree069a632e52349e9de54c995399ada4b77aa4fd6a
parentcc92ee32cde8d0ce0092d3ff30aece90af7b1781
util: storage: Invert the way recursive metadata retrieval works

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
src/qemu/qemu_domain.c
src/qemu/qemu_driver.c
src/security/virt-aa-helper.c
src/util/virstoragefile.c
src/util/virstoragefile.h
tests/virstoragetest.c