Re: [Qemu-block] [PATCH v7 6/6] qcow2: Avoid memory over-allocation on compressed images

2018-11-13 Thread Eric Blake
On 6/29/18 10:47 AM, Kevin Wolf wrote: Am 29.06.2018 um 17:16 hat Eric Blake geschrieben: On 06/29/2018 04:03 AM, Kevin Wolf wrote: Am 28.06.2018 um 21:07 hat Eric Blake geschrieben: When reading a compressed image, we were allocating s->cluster_data to 32*cluster_size + 512 (possibly over 64

Re: [Qemu-block] [PATCH v7 6/6] qcow2: Avoid memory over-allocation on compressed images

2018-06-29 Thread Kevin Wolf
Am 29.06.2018 um 17:47 hat Kevin Wolf geschrieben: > Am 29.06.2018 um 17:16 hat Eric Blake geschrieben: > > On 06/29/2018 04:03 AM, Kevin Wolf wrote: > > > Am 28.06.2018 um 21:07 hat Eric Blake geschrieben: > > > > When reading a compressed image, we were allocating s->cluster_data > > > > to 32*cl

Re: [Qemu-block] [PATCH v7 6/6] qcow2: Avoid memory over-allocation on compressed images

2018-06-29 Thread Eric Blake
On 06/29/2018 04:03 AM, Kevin Wolf wrote: Am 28.06.2018 um 21:07 hat Eric Blake geschrieben: 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: However, the qc

Re: [Qemu-block] [PATCH v7 6/6] qcow2: Avoid memory over-allocation on compressed images

2018-06-29 Thread Kevin Wolf
Am 29.06.2018 um 17:16 hat Eric Blake geschrieben: > On 06/29/2018 04:03 AM, Kevin Wolf wrote: > > Am 28.06.2018 um 21:07 hat Eric Blake geschrieben: > > > When reading a compressed image, we were allocating s->cluster_data > > > to 32*cluster_size + 512 (possibly over 64 megabytes, for an image >

Re: [Qemu-block] [PATCH v7 6/6] qcow2: Avoid memory over-allocation on compressed images

2018-06-29 Thread Kevin Wolf
Am 28.06.2018 um 21:07 hat Eric Blake geschrieben: > 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

[Qemu-block] [PATCH v7 6/6] qcow2: Avoid memory over-allocation on compressed images

2018-06-28 Thread Eric Blake
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 encryption