[PATCH 3/4] util: Remove 'externalDataStoreRaw' field from virStorageSource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's not used for anything so we don't need to extract it.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virstoragefile.c | 14 ++------------
 src/util/virstoragefile.h |  2 --
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 69c354e7b4..32ca481cc0 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -1022,12 +1022,6 @@ virStorageFileGetMetadataInternal(virStorageSourcePtr meta,
         fileTypeInfo[meta->format].getFeatures(&meta->features, meta->format, buf, len) < 0)
         return -1;

-    VIR_FREE(meta->externalDataStoreRaw);
-    if (meta->format == VIR_STORAGE_FILE_QCOW2 &&
-        qcow2GetExtensions(buf, len, NULL, &meta->externalDataStoreRaw) < 0) {
-        return -1;
-    }
-
     VIR_FREE(meta->compat);
     if (meta->format == VIR_STORAGE_FILE_QCOW2 && meta->features)
         meta->compat = g_strdup("1.1");
@@ -2410,7 +2404,6 @@ virStorageSourceCopy(const virStorageSource *src,
     def->relPath = g_strdup(src->relPath);
     def->backingStoreRaw = g_strdup(src->backingStoreRaw);
     def->backingStoreRawFormat = src->backingStoreRawFormat;
-    def->externalDataStoreRaw = g_strdup(src->externalDataStoreRaw);
     def->snapshot = g_strdup(src->snapshot);
     def->configFile = g_strdup(src->configFile);
     def->nodeformat = g_strdup(src->nodeformat);
@@ -2702,7 +2695,6 @@ virStorageSourceClear(virStorageSourcePtr def)
     virStorageSourceSeclabelsClear(def);
     virStoragePermsFree(def->perms);
     VIR_FREE(def->timestamps);
-    VIR_FREE(def->externalDataStoreRaw);

     virStorageSourceSliceFree(def->sliceStorage);

@@ -5280,13 +5272,11 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src,
         return -1;

     /* If we probed the format we MUST ensure that nothing else than the current
-     * image (this includes both backing files and external data store) is
-     * considered for security labelling and/or recursion. */
+     * image is considered for security labelling and/or recursion. */
     if (orig_format == VIR_STORAGE_FILE_AUTO) {
-        if (src->backingStoreRaw || src->externalDataStoreRaw) {
+        if (src->backingStoreRaw) {
             src->format = VIR_STORAGE_FILE_RAW;
             VIR_FREE(src->backingStoreRaw);
-            VIR_FREE(src->externalDataStoreRaw);
             return -2;
         }
     }
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index 8fe8e7c822..d56d5c45e3 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -345,8 +345,6 @@ struct _virStorageSource {
      * current file.  */
     char *backingStoreRaw;
     virStorageFileFormat backingStoreRawFormat;
-    /* 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 */
-- 
2.26.0





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux