[PATCH 2/4] util: Remove 'externalDataStore' 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 | 41 ---------------------------------------
 src/util/virstoragefile.h |  3 ---
 2 files changed, 44 deletions(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index ffc8bdb344..69c354e7b4 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -2475,12 +2475,6 @@ virStorageSourceCopy(const virStorageSource *src,
             return NULL;
     }

-    if (src->externalDataStore) {
-        if (!(def->externalDataStore = virStorageSourceCopy(src->externalDataStore,
-                                                            true)))
-            return NULL;
-    }
-
     /* ssh config passthrough for libguestfs */
     def->ssh_host_key_check_disabled = src->ssh_host_key_check_disabled;
     def->ssh_user = g_strdup(src->ssh_user);
@@ -2712,9 +2706,6 @@ virStorageSourceClear(virStorageSourcePtr def)

     virStorageSourceSliceFree(def->sliceStorage);

-    virObjectUnref(def->externalDataStore);
-    def->externalDataStore = NULL;
-
     virStorageNetHostDefFree(def->nhosts, def->hosts);
     virStorageAuthDefFree(def->auth);
     virObjectUnref(def->privateData);
@@ -4107,24 +4098,6 @@ virStorageSourceNewFromBacking(virStorageSourcePtr parent,
 }


-static int
-virStorageSourceNewFromExternalData(virStorageSourcePtr parent,
-                                    virStorageSourcePtr *externalDataStore)
-{
-    int rc;
-
-    if ((rc = virStorageSourceNewFromChild(parent,
-                                           parent->externalDataStoreRaw,
-                                           externalDataStore)) < 0)
-        return rc;
-
-    /* qcow2 data_file can only be raw */
-    (*externalDataStore)->format = VIR_STORAGE_FILE_RAW;
-    (*externalDataStore)->readonly = parent->readonly;
-    return rc;
-}
-
-
 /**
  * @src: disk source definition structure
  * @fd: file descriptor
@@ -5351,20 +5324,6 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src,
             return -1;
     }

-    if (src->externalDataStoreRaw) {
-        g_autoptr(virStorageSource) externalDataStore = NULL;
-
-        if ((rv = virStorageSourceNewFromExternalData(src,
-                                                      &externalDataStore)) < 0)
-            return -1;
-
-        /* the file would not be usable for VM usage */
-        if (rv == 1)
-            return 0;
-
-        src->externalDataStore = g_steal_pointer(&externalDataStore);
-    }
-
     return 0;
 }

diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index 7939c09cd5..8fe8e7c822 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -334,9 +334,6 @@ struct _virStorageSource {
     /* backing chain of the storage source */
     virStorageSourcePtr backingStore;

-    /* external data store storage source */
-    virStorageSourcePtr externalDataStore;
-
     /* metadata for storage driver access to remote and local volumes */
     virStorageDriverDataPtr drv;

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