]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: domain: Don't treat unknown storage type as not having backing chain
authorPeter Krempa <pkrempa@redhat.com>
Thu, 5 May 2016 13:25:52 +0000 (15:25 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 9 May 2016 11:40:17 +0000 (13:40 +0200)
commita391a9c5b1cfb057af734928ded0c0b0900ef41f
tree9c9344dcac9bffd6bb75083f1c741e1b15a06db8
parentbd9d7078949ab19fd844926a20196d5533cfdf89
qemu: domain: Don't treat unknown storage type as not having backing chain

qemuDomainCheckDiskPresence has short-circuit code to skip the
determination of the disk backing chain for storage formats that can't
have backing volumes. The code treats VIR_STORAGE_FILE_NONE as not
having backing chain and skips the call to qemuDomainDetermineDiskChain.

This is wrong as qemuDomainDetermineDiskChain is responsible for storage
format detection and has logic to determine the default type if format
detection is disabled.

This allows to storage passed via <disk type="volume"> to circumvent the
enforcement to have correct storage format or that we shall default to
format='raw', since we don't set the default type via the post parse
callback for "volume" backed disks as the translation code could come up
with a better guess.

This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1328003
src/qemu/qemu_domain.c