qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Eric Blake <eblake@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, den@openvz.org, dplotnikov@virtuozzo.com,
	qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [PATCH v10 2/2] docs: qcow2: introduce compression type feature
Date: Tue, 21 Jan 2020 17:20:12 +0100	[thread overview]
Message-ID: <f005bd08-faee-1116-071f-819a491086bb@redhat.com> (raw)
In-Reply-To: <679ba957-0b47-27ab-0684-e066ca8a6196@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 2444 bytes --]

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 <dplotnikov@virtuozzo.com>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>> ---
>>   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.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2020-01-21 16:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 17:13 [PATCH v10 0/2] qcow2: add zstd cluster compression Vladimir Sementsov-Ogievskiy
2020-01-20 17:13 ` [PATCH v10 1/2] docs: improve qcow2 spec about extending image header Vladimir Sementsov-Ogievskiy
2020-01-20 19:42   ` Eric Blake
2020-01-21 16:18     ` Max Reitz
2020-01-31 14:05       ` Vladimir Sementsov-Ogievskiy
2020-01-31 13:55     ` Vladimir Sementsov-Ogievskiy
2020-01-20 17:13 ` [PATCH v10 2/2] docs: qcow2: introduce compression type feature Vladimir Sementsov-Ogievskiy
2020-01-20 19:46   ` Eric Blake
2020-01-21  9:06     ` Vladimir Sementsov-Ogievskiy
2020-01-21 16:20     ` Max Reitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f005bd08-faee-1116-071f-819a491086bb@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=dplotnikov@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).