提交 94d1cb25 编写于 作者: P Peter Krempa

util: Remove 'externalDataStore' field from virStorageSource

It's not used for anything so we don't need to extract it.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 062d8f0e
......@@ -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);
......@@ -4125,24 +4116,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
......@@ -5369,20 +5342,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;
}
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册