[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH V4 01/10] specs/qcow2: add compress format exten
Re: [Qemu-block] [PATCH V4 01/10] specs/qcow2: add compress format extension
Thu, 20 Jul 2017 13:31:27 -0500
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
On 07/20/2017 11:26 AM, Peter Lieven wrote:
>> I haven't yet checked your code implementation to see where you are
>> setting window sizes, to know if window size is something that should be
>> a tunable in the file format.
> You don't have to know the window size that was used. The docs of zlib
> just say, that the windowSize specified at inflate must be greater or equal
> to the one used at deflate. So if we change the code to use 15 we can safely
> decompress old clusters that where compressed with 12.
Then you DO have to know the window size. If I write my own qcow2
parser, and don't know what size you picked on compression, then how do
I know that the size I pick is >= your size during my decompression?
Even if you DON'T want size to be a tunable (and I'm on the fence on
that one), you STILL need the spec to state that for maximum
compatibility, when the incompatible feature is off, implementations
MUST use window size 12 for compression; and that when the compression
extension is used, implementations MUST use window size 15.
Or, by having window size be a tunable in the extension header allows
implementations to record window size, then you allow implemenations to
explicitly KNOW what window size they must meet or exceed.
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Description: OpenPGP digital signature
[Qemu-block] [PATCH V4 10/10] block/qcow2: add compress info to image specific info, Peter Lieven, 2017/07/20
[Qemu-block] [PATCH V4 02/10] qapi/block-core: add Qcow2Compress parameters, Peter Lieven, 2017/07/20
[Qemu-block] [PATCH V4 07/10] block/qcow2: optimize qcow2_co_pwritev_compressed, Peter Lieven, 2017/07/20
[Qemu-block] [PATCH V4 08/10] block/qcow2: start using the compress format extension, Peter Lieven, 2017/07/20