提交 884cc9d6 编写于 作者: C Cole Robinson

storagefile: Add externalDataStore member

Add the plumbing to track a externalDataStoreRaw as a virStorageSource
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 8863c03d
...@@ -2340,6 +2340,12 @@ virStorageSourceCopy(const virStorageSource *src, ...@@ -2340,6 +2340,12 @@ virStorageSourceCopy(const virStorageSource *src,
return NULL; return NULL;
} }
if (src->externalDataStore) {
if (!(def->externalDataStore = virStorageSourceCopy(src->externalDataStore,
true)))
return NULL;
}
VIR_STEAL_PTR(ret, def); VIR_STEAL_PTR(ret, def);
return ret; return ret;
} }
...@@ -2561,6 +2567,9 @@ virStorageSourceClear(virStorageSourcePtr def) ...@@ -2561,6 +2567,9 @@ virStorageSourceClear(virStorageSourcePtr def)
VIR_FREE(def->timestamps); VIR_FREE(def->timestamps);
VIR_FREE(def->externalDataStoreRaw); VIR_FREE(def->externalDataStoreRaw);
virObjectUnref(def->externalDataStore);
def->externalDataStore = NULL;
virStorageNetHostDefFree(def->nhosts, def->hosts); virStorageNetHostDefFree(def->nhosts, def->hosts);
virStorageAuthDefFree(def->auth); virStorageAuthDefFree(def->auth);
virObjectUnref(def->privateData); virObjectUnref(def->privateData);
......
...@@ -292,6 +292,9 @@ struct _virStorageSource { ...@@ -292,6 +292,9 @@ struct _virStorageSource {
/* backing chain of the storage source */ /* backing chain of the storage source */
virStorageSourcePtr backingStore; virStorageSourcePtr backingStore;
/* external data store storage source */
virStorageSourcePtr externalDataStore;
/* metadata for storage driver access to remote and local volumes */ /* metadata for storage driver access to remote and local volumes */
virStorageDriverDataPtr drv; virStorageDriverDataPtr drv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册