mirror of https://gitee.com/openkylin/libvirt.git
util: storage: Add shadow copies of few disk properties to virStorageSource
Few things which are currently stored the virDomainDiskDef structure are actually relevant for the storage source as well. Add the fields with a note that they are just mirror of the values from the disk. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
38fd7aec33
commit
d302b5896e
|
@ -2042,6 +2042,10 @@ virStorageSourceCopy(const virStorageSource *src,
|
|||
ret->detected = src->detected;
|
||||
ret->debugLevel = src->debugLevel;
|
||||
ret->debug = src->debug;
|
||||
ret->iomode = src->iomode;
|
||||
ret->cachemode = src->cachemode;
|
||||
ret->discard = src->discard;
|
||||
ret->detect_zeroes = src->detect_zeroes;
|
||||
|
||||
/* storage driver metadata are not copied */
|
||||
ret->drv = NULL;
|
||||
|
|
|
@ -305,6 +305,14 @@ struct _virStorageSource {
|
|||
|
||||
unsigned int debugLevel;
|
||||
bool debug;
|
||||
|
||||
/* Libvirt currently stores the following properities in virDomainDiskDef.
|
||||
* These instances are currently just copies from the parent definition and
|
||||
* are not mapped back to the XML */
|
||||
int iomode; /* enum virDomainDiskIo */
|
||||
int cachemode; /* enum virDomainDiskCache */
|
||||
int discard; /* enum virDomainDiskDiscard */
|
||||
int detect_zeroes; /* enum virDomainDiskDetectZeroes */
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue