[libvirt] [PATCH 13/30] storagefile: Add externalDataStoreRaw member

Daniel Henrique Barboza danielhb413 at gmail.com
Wed Oct 9 21:38:45 UTC 2019



On 10/7/19 6:49 PM, Cole Robinson wrote:
> Add the plumbing to track a qcow2 external data file path in
> virStorageSource
>
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413 at gmail.com>

>   src/util/virstoragefile.c | 2 ++
>   src/util/virstoragefile.h | 2 ++
>   2 files changed, 4 insertions(+)
>
> diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
> index 5a4e4b24ae..621cc56e87 100644
> --- a/src/util/virstoragefile.c
> +++ b/src/util/virstoragefile.c
> @@ -2258,6 +2258,7 @@ virStorageSourceCopy(const virStorageSource *src,
>           VIR_STRDUP(def->volume, src->volume) < 0 ||
>           VIR_STRDUP(def->relPath, src->relPath) < 0 ||
>           VIR_STRDUP(def->backingStoreRaw, src->backingStoreRaw) < 0 ||
> +        VIR_STRDUP(def->externalDataStoreRaw, src->externalDataStoreRaw) < 0 ||
>           VIR_STRDUP(def->snapshot, src->snapshot) < 0 ||
>           VIR_STRDUP(def->configFile, src->configFile) < 0 ||
>           VIR_STRDUP(def->nodeformat, src->nodeformat) < 0 ||
> @@ -2533,6 +2534,7 @@ virStorageSourceClear(virStorageSourcePtr def)
>       virStorageSourceSeclabelsClear(def);
>       virStoragePermsFree(def->perms);
>       VIR_FREE(def->timestamps);
> +    VIR_FREE(def->externalDataStoreRaw);
>   
>       virStorageNetHostDefFree(def->nhosts, def->hosts);
>       virStorageAuthDefFree(def->auth);
> diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
> index 2472d89c85..bbff511657 100644
> --- a/src/util/virstoragefile.h
> +++ b/src/util/virstoragefile.h
> @@ -302,6 +302,8 @@ struct _virStorageSource {
>       /* Name of the child backing store recorded in metadata of the
>        * current file.  */
>       char *backingStoreRaw;
> +    /* Name of the child data file recorded in metadata of the current file. */
> +    char *externalDataStoreRaw;
>   
>       /* metadata that allows identifying given storage source */
>       char *nodeformat;  /* name of the format handler object */




More information about the libvir-list mailing list