[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH for-2.12 v5] iotests: Test abnormally large size
Re: [Qemu-block] [PATCH for-2.12 v5] iotests: Test abnormally large size in compressed cluster descriptor
Thu, 29 Mar 2018 09:37:06 -0500
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
On 03/29/2018 07:07 AM, Alberto Garcia wrote:
L2 entries for compressed clusters have a field that indicates the
number of sectors used to store the data in the image.
That's however not the size of the compressed data itself, just the
number of sectors where that data is located. The actual data size is
usually not a multiple of the sector size, and therefore cannot be
represented with this field.
One possible task for the future is to make 'qemu-img check' verify
the sizes of the compressed clusters, by trying to decompress the data
and checking that the size stored in the L2 entry is correct.
Is it still worth trying to add such a check in 2.12? (Probably not -
the bug has been there "since the beginning", so it's not a regression
and thus not a showstopper if it stays there for another release)
Signed-off-by: Alberto Garcia <address@hidden>
v5: Use 'write -c' instead of 'write' followed by 'convert' [Max]
Add TODO comment explaining that the size of compressed clusters
should also be corrected when it's too large in order to avoid
referencing other unrelated clusters.
Thanks, those changes look good.
Reviewed-by: Eric Blake <address@hidden>
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org