]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: blockcopy: Fix conditions when virStorageSource should be initialized
authorPeter Krempa <pkrempa@redhat.com>
Fri, 29 Nov 2019 13:33:05 +0000 (14:33 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 2 Dec 2019 14:44:03 +0000 (15:44 +0100)
commit6519c1b55413b8d8d32d0cfe97ba99cb21e8ff8c
tree5cfb90cd2a78b42eb7a505ea324bd9d91fc9e4b5
parentc958b8eb46d05316ad19f581a00df47ed7c97b10
qemu: blockcopy: Fix conditions when virStorageSource should be initialized

Commit 4b58fdf280a which enabled block copy also for network
destinations needed to limit when the 'mirror' storage source is
initialized in cases when we e.g. don't have an appropriate backend.

Limiting it just to virStorageFileSupportsCreate is too restrictive as
for example we can't precreate block devices and thus wouldn't
initialize the 'mirror' but since it's a local source we'd try to
examine it. This would fail since it wouldn't be initialized.

Fix it by introducing a more granular check whether certain operations
are supported and fix the check interlocks.

https://bugzilla.redhat.com/show_bug.cgi?id=1778058

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