mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 03:42:19 +00:00
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
This commit is contained in:
parent
bd9d707894
commit
a391a9c5b1
@ -3817,7 +3817,7 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
|
||||
* without backing support, the fact that the file exists is
|
||||
* more than enough */
|
||||
if (virStorageSourceIsLocalStorage(disk->src) &&
|
||||
format >= VIR_STORAGE_FILE_NONE &&
|
||||
format > VIR_STORAGE_FILE_NONE &&
|
||||
format < VIR_STORAGE_FILE_BACKING &&
|
||||
virFileExists(virDomainDiskGetSource(disk)))
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user