提交 d302b589 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 38fd7aec
...@@ -2042,6 +2042,10 @@ virStorageSourceCopy(const virStorageSource *src, ...@@ -2042,6 +2042,10 @@ virStorageSourceCopy(const virStorageSource *src,
ret->detected = src->detected; ret->detected = src->detected;
ret->debugLevel = src->debugLevel; ret->debugLevel = src->debugLevel;
ret->debug = src->debug; 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 */ /* storage driver metadata are not copied */
ret->drv = NULL; ret->drv = NULL;
......
...@@ -305,6 +305,14 @@ struct _virStorageSource { ...@@ -305,6 +305,14 @@ struct _virStorageSource {
unsigned int debugLevel; unsigned int debugLevel;
bool debug; 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 */
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册