]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Validate backing store of 'mirror' for block copy
authorPeter Krempa <pkrempa@redhat.com>
Wed, 15 May 2019 15:12:35 +0000 (17:12 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 21 May 2019 12:22:06 +0000 (14:22 +0200)
commit56fe0d6d299c712fb642df3e19457e6bf3a72ee7
treeff593fecd6a6cbd9cae414acb525c9a3251bb3f5
parent83c579d0ae8333f80dc7cd8025c0e8a97bb91021
qemu: Validate backing store of 'mirror' for block copy

Since 4e797f1a we parse backingStore of mirror which will later be used
with blockdev. Add some validation for the user passed mirror at the
current point to make sure it's not used improperly.

Validate that it's not used without blockdev and also that it's not
passed when not requesting a shallow copy. Also add a chain terminator
for a deep copy since we know the resulting mirror will not have chain.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c