mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-20 11:35:19 +00:00
storagefile: Add externalDataStore member
Add the plumbing to track a externalDataStoreRaw as a virStorageSource Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
8863c03d7d
commit
884cc9d615
@ -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)
|
|||||||
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 {
|
|||||||
/* 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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user