On Tue 27 Feb 2018 05:29:44 PM CET, Eric Blake wrote:
> So, it's time to cut back on the waste. A compressed cluster
> written by qemu will NEVER occupy more than an uncompressed
> cluster, but based on mid-sector alignment, we may still need
> to read 1 cluster + 1 sector in order to recover
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