On Thu 22 Feb 2018 08:02:44 PM CET, Eric Blake wrote:
> On 02/22/2018 10:23 AM, Alberto Garcia wrote:
>> On Thu 22 Feb 2018 04:59:22 PM CET, Eric Blake wrote:
>>> sector_offset = coffset & 511;
>>> csize = nb_csectors * 512 - sector_offset;
>> [...]
>>> +
On 02/22/2018 10:23 AM, Alberto Garcia wrote:
On Thu 22 Feb 2018 04:59:22 PM CET, Eric Blake wrote:
sector_offset = coffset & 511;
csize = nb_csectors * 512 - sector_offset;
[...]
+assert(csize < 2 * s->cluster_size);
I think it should be <=
If
On Thu 22 Feb 2018 04:59:22 PM CET, Eric Blake wrote:
> sector_offset = coffset & 511;
> csize = nb_csectors * 512 - sector_offset;
[...]
> +assert(csize < 2 * s->cluster_size);
I think it should be <=
If sector_offset is 0 and nb_csector is the maximum
When reading a compressed image, we were allocating s->cluster_data
to 32*cluster_size + 512 (possibly over 64 megabytes, for an image
with 2M clusters). Let's check out the history:
Back when qcow2 was first written, we used s->cluster_data for
everything, including copy_sectors() and