On 05.06.20 15:00, Kevin Wolf wrote:

[...]

> Makes sense. I'm not against preallocation during image creation. I just
> think it shouldn't play a role in deciding whether an image is valid or
> not.

Oh, no.  I wouldn’t consider it corrupted just because some clusters are
not allocated.  I’d just say any program that handles qcow2 files is
responsible to ensure that images with the data-file-raw flag actually
fulfill the flag’s promise.  So if a cluster isn’t allocated in qcow2,
it must read as zeroes in the data file (because the spec disallows
backing files with data-file-raw anyway[1]).

It’s just my impression that qemu currently doesn’t always ensure this,
and the easiest way to do so would be to enforce metadata preallocation
for such images.

Max

[1] Such images are indeed corrupt, hence this patch here from Berto.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to