[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-5.1] qcow2: Don't open images with a backing file and the
From: |
Max Reitz |
Subject: |
Re: [PATCH for-5.1] qcow2: Don't open images with a backing file and the data-file-raw bit |
Date: |
Fri, 5 Jun 2020 16:38:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
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.
signature.asc
Description: OpenPGP digital signature