]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: blockcopy: Explicitly assert 'reuse' for block devices
authorPeter Krempa <pkrempa@redhat.com>
Tue, 11 Jul 2017 06:23:38 +0000 (08:23 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 20 Jul 2017 08:07:48 +0000 (10:07 +0200)
commit060d4ec6a0e40c8391105c46ad31dd000435eb93
tree44076678306e15eca30086e56d73500cf8d5bb08
parenta805320b677c0d622a55e6a6485f7d7f24e5af61
qemu: blockcopy: Explicitly assert 'reuse' for block devices

When copying to a block device, the block device will already exist. To
allow users using a block device without any preparation, they need to
use the block copy without VIR_DOMAIN_BLOCK_COPY_REUSE_EXT.

This means that if the target is an existing block device we don't need
to prepare it, but we can't reject it as being existing.

To avoid breaking this feature, explicitly assume that existing block
devices will be reused even without that flag explicitly specified,
while skipping attempts to create it.

qemuMonitorDriveMirror still needs to honor the flag as specified by the
user, since qemu overwrites the metadata otherwise.
src/qemu/qemu_driver.c