]> xenbits.xensource.com Git - libvirt.git/commit
storage: remember relative names in backing chain
authorEric Blake <eblake@redhat.com>
Tue, 9 Oct 2012 23:47:42 +0000 (17:47 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 19 Oct 2012 23:35:10 +0000 (17:35 -0600)
commit82507838e073eb32e570a9bb2508c2863f20211e
treec694782c6c9c6e976264e5788f25ab0050557bad
parent1fc9593271c5981dc42d2d41e11ee38ee7c67ec5
storage: remember relative names in backing chain

In order to search for a backing file name as literally present
in a chain, we need to remember if the chain had relative names.
Also, searching for absolute names is easier if we only have
to canonicalize once, rather than on every iteration.

* src/util/storage_file.h (_virStorageFileMetadata): Add field.
* src/util/storage_file.c (virStorageFileGetMetadataFromBuf):
(virStorageFileFreeMetadata): Manage it
(absolutePathFromBaseFile): Store absolute names in canonical form.
src/util/storage_file.c
src/util/storage_file.h