[libvirt] [PATCH 1/5] conf: provide details on network backing store
Peter Krempa
pkrempa at redhat.com
Thu Apr 10 09:58:24 UTC 2014
On 04/10/14 05:41, Eric Blake wrote:
> So far, my work has been merely preserving the status quo of
> backing file analysis. But this patch starts to tread in the
> territory of making the backing chain code more powerful - we
> will eventually support network storage containing non-raw
> formats. Here, we expose metadata information about a network
> backing store, even if that information is still hardcoded to
> a raw format for now.
>
> * src/util/virstoragefile.c (virStorageFileGetMetadataRecurse):
> Also populate struct for non-file backing.
> (virStorageFileGetMetadata, virStorageFileGetMetadatainternal):
> Recognize non-file top image.
> (virFindBackingFile): Add comment.
> * tests/virstoragetest.c (mymain): Update test to reflect it.
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
> src/util/virstoragefile.c | 62 +++++++++++++++++++++++++++++++++++------------
> tests/virstoragetest.c | 17 +++++++++----
> 2 files changed, 59 insertions(+), 20 deletions(-)
>
> diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
> index f5fe8ad..7a91a01 100644
> --- a/src/util/virstoragefile.c
> +++ b/src/util/virstoragefile.c
> @@ -874,6 +882,12 @@ virStorageFileGetMetadataInternal(const char *path,
> meta->backingStoreRaw, path);
>
> }
> + } else {
> + if (VIR_STRDUP(meta->backingStoreRaw, backing) < 0) {
> + VIR_FREE(backing);
> + goto cleanup;
> + }
> + backingFormat = VIR_STORAGE_FILE_RAW;
> }
> VIR_FREE(backing);
> meta->backingStoreFormat = backingFormat;
This hunk invalidates the comment in virStorageFileChainCheckBroken, as
currently backing store raw will be set always.
ACK with the comment updated.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140410/47955b2b/attachment-0001.sig>
More information about the libvir-list
mailing list