[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v10 2/2] docs: qcow2: introduce compression type feature

From: Max Reitz
Subject: Re: [PATCH v10 2/2] docs: qcow2: introduce compression type feature
Date: Tue, 21 Jan 2020 17:20:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1

On 20.01.20 20:46, Eric Blake wrote:
> On 1/20/20 11:13 AM, Vladimir Sementsov-Ogievskiy wrote:
>> The patch add new additional field to qcow2 header: compression_type,
> s/add/adds a/
> s/to/to the/
>> which specifies compression type. If field is absent or zero, default
>> compression type is set: ZLIB, which corresponds to current behavior.
>> New compression type (ZSTD) is to be added in further commit.
> It would be nice to have that patch as part of the same series, but it
> has already been posted to the list separately, so I'm okay with this
> series as just doc word-smithing while we get that patch series in soon.
>> Suggested-by: Denis Plotnikov <address@hidden>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>> ---
>>   docs/interop/qcow2.txt | 16 +++++++++++++++-
>>   1 file changed, 15 insertions(+), 1 deletion(-)
>> diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt
>> index 355925c35e..4569f0dba3 100644
>> --- a/docs/interop/qcow2.txt
>> +++ b/docs/interop/qcow2.txt
>> @@ -109,6 +109,11 @@ the next fields through header_length.
>>                                   An External Data File Name header
>> extension may
>>                                   be present if this bit is set.
>>   +                    Bit 3:      Compression type bit.  If this bit
>> is set,
>> +                                a non-default compression is used for
>> compressed
>> +                                clusters. The compression_type field
>> must be
>> +                                present and not zero.
> Why must the compression_type field be non-zero?  If this bit is set, an
> older qemu cannot use the image, regardless of the contents of the
> compression_type field, so for maximum back-compat, a sane app will
> never set this bit when compression_type is zero.  But there is nothing
> technically wrong with setting this bit even when compression_type is 0,
> and newer qemu would still manage to use the image correctly with zlib
> compression if it were not for this arbitrary restriction.

There is something technically wrong if the specification demands otherwise.

As you yourself say, no sane software would deviate from this behavior
anyway.  If that is so, I don’t see why we shouldn’t specify it this
way.  I see no benefit in allowing this bit be set for zlib images.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]