]> xenbits.xensource.com Git - libvirt.git/commit
conf: track when storage type is still undetermined
authorEric Blake <eblake@redhat.com>
Wed, 2 Apr 2014 19:01:46 +0000 (13:01 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 4 Apr 2014 16:58:23 +0000 (10:58 -0600)
commit9673418ce50688f946fdaa8ff33398e402dc20ba
tree4cdf133d776c8452807fa53e415540a789c2213a
parentd1a1d841dbb256392a5c6b2a795fbed022c17539
conf: track when storage type is still undetermined

Right now, virStorageFileMetadata tracks bool backingStoreIsFile
for whether the backing string specified in metadata can be
resolved as a file (covering both block and regular file
resources) or is treated as a network protocol.  But when
merging this struct with virStorageSource, it will be easier
to just actually track which type of resource it is, as well
as have a reserved value for the case where the resource type
is unknown (or had an error during probing).

* src/util/virstoragefile.h (virStorageType): Add a placeholder
value, swap order to match similar public enum.
* src/util/virstoragefile.c (virStorage): Update string mapping.
* src/conf/domain_conf.c (virDomainDiskSourceParse)
(virDomainDiskDefParseXML, virDomainDiskDefFormat)
(virDomainDiskSourceFormat): Adjust clients.
* src/conf/snapshot_conf.c (virDomainSnapshotDiskDefParseXML):
Likewise.
* src/qemu/qemu_driver.c
(qemuDomainSnapshotPrepareDiskExternalBackingInactive)
(qemuDomainSnapshotPrepareDiskExternalOverlayActive)
(qemuDomainSnapshotPrepareDiskExternalOverlayInactive)
(qemuDomainSnapshotPrepareDiskInternal)
(qemuDomainSnapshotCreateSingleDiskActive): Likewise.
* src/qemu/qemu_command.c (qemuGetDriveSourceString): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/conf/domain_conf.c
src/conf/snapshot_conf.c
src/qemu/qemu_command.c
src/qemu/qemu_driver.c
src/util/virstoragefile.c
src/util/virstoragefile.h