[libvirt] [PATCH 3/5] conf: track when storage type is still undetermined

Peter Krempa pkrempa at redhat.com
Fri Apr 4 08:59:26 UTC 2014


On 04/04/14 06:32, Eric Blake wrote:
> 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 at redhat.com>
> ---
>  src/conf/domain_conf.c    | 10 ++++++----
>  src/conf/snapshot_conf.c  |  2 +-
>  src/qemu/qemu_command.c   |  1 +
>  src/qemu/qemu_driver.c    | 11 +++++++++--
>  src/util/virstoragefile.c |  3 ++-
>  src/util/virstoragefile.h |  8 ++++++--
>  6 files changed, 25 insertions(+), 10 deletions(-)

ACK, having _TYPE_BLOCK as index 0 caused grief a lot of times for me.

Peter


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140404/1bd9b2e0/attachment-0001.sig>


More information about the libvir-list mailing list