]> xenbits.xensource.com Git - libvirt.git/commit
util: storage: Don't treat files with missing backing store format as 'raw'
authorPeter Krempa <pkrempa@redhat.com>
Tue, 17 Dec 2019 16:04:04 +0000 (17:04 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 18 Dec 2019 08:36:48 +0000 (09:36 +0100)
commit3615e8b39badf2a526996a69dc91a92b04cf262e
treee8958c23706be343a8aee2a9c8cdc5cac0aafac4
parenta649369480a34c22cc1b53f53d4765ca3302816a
util: storage: Don't treat files with missing backing store format as 'raw'

Assuming that the backing image format is raw is wrong when doing image
detection:

1) In -drive mode qemu will still probe the image format of the backing
   image. This means it will try to open a backing file of the image
   which will fail if a more advanced security model is in use.

2) In blockdev mode the image will be opened as raw actually which is
   wrong since it might be qcow. Not opening the backing images will
   also end up in the guest seeing corrupted data.

Rather than attempt to solve various corner cases when us assuming the
storage file being raw and actually being right forbid startup when the
guest image doesn't have the format specified in the metadata.

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virstoragefile.c
tests/virstoragetest.c