On 14.07.2016 18:59, Vladimir Sementsov-Ogievskiy wrote: > There are no needs to allocate more than one cluster, as we set > avail_out for deflate to one cluster. > > Zlib docs (http://www.zlib.net/manual.html) says: > "deflate compresses as much data as possible, and stops when the input > buffer becomes empty or the output buffer becomes full." > > So, deflate will not write more than avail_out to output buffer. If > there is no enough space in output buffer for compressed data (it may be > larger than input data) deflate just returns Z_OK. (if all data is > compressed and written to output buffer deflate returns Z_STREAM_END). > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > > v2: improve commit message > > block/qcow.c | 2 +- > block/qcow2.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-)
Thanks Vladimir, applied to my block branch (with s/no/not/ as proposed by Eric): https://github.com/XanClic/qemu/commits/block Max
signature.asc
Description: OpenPGP digital signature