]> xenbits.xensource.com Git - libvirt.git/commit
conf: store mirroring information in virStorageSource
authorEric Blake <eblake@redhat.com>
Wed, 21 May 2014 20:22:21 +0000 (14:22 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 6 Jun 2014 15:56:28 +0000 (09:56 -0600)
commit7b7bf001108b03c3b8983ca922f0e7727953910f
tree7acaf5fedb87fe343358bfc89739dfa1ce89bcb2
parentc123ef7104b8728dfa1357693c35d15e0674841d
conf: store mirroring information in virStorageSource

The current implementation of 'virsh blockcopy' (virDomainBlockRebase)
is limited to copying to a local file name.  But future patches want
to extend it to also copy to network disks.  This patch converts over
to a virStorageSourcePtr, although it should have no semantic change
visible to the user, in anticipation of those future patches being
able to use more fields for non-file destinations.

* src/conf/domain_conf.h (_virDomainDiskDef): Change type of
mirror information.
* src/conf/domain_conf.c (virDomainDiskDefParseXML): Localize
mirror parsing into new object.
(virDomainDiskDefFormat): Adjust clients.
* src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse):
Likewise.
* src/qemu/qemu_driver.c (qemuDomainBlockPivot)
(qemuDomainBlockJobImpl, qemuDomainBlockCopy): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_domain.c
src/qemu/qemu_driver.c
src/qemu/qemu_process.c