diff mbox series

[13/30] storagefile: Add externalDataStoreRaw member

Message ID d01d59582c99565aaf16807ba7b5af6ea18a78f7.1570482718.git.crobinso@redhat.com
State New
Headers show
Series storagefile, security: qcow2 data_file support | expand

Commit Message

Cole Robinson Oct. 7, 2019, 9:49 p.m. UTC
Add the plumbing to track a qcow2 external data file path in
virStorageSource

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 src/util/virstoragefile.c | 2 ++
 src/util/virstoragefile.h | 2 ++
 2 files changed, 4 insertions(+)

-- 
2.23.0

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

Comments

Daniel Henrique Barboza Oct. 9, 2019, 9:38 p.m. UTC | #1
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@redhat.com>

> ---


Reviewed-by: Daniel Henrique Barboza <danielhb413@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 */


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox series

Patch

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 */