All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	Denis Plotnikov <dplotnikov@virtuozzo.com>,
	qemu-devel@nongnu.org
Cc: kwolf@redhat.com, armbru@redhat.com, qemu-block@nongnu.org,
	mreitz@redhat.com
Subject: Re: [PATCH v1 1/8] qcow2: introduce compression type feature
Date: Thu, 27 Feb 2020 08:13:13 -0600	[thread overview]
Message-ID: <e93ca287-07c0-c6f9-c490-31954bcde274@redhat.com> (raw)
In-Reply-To: <78aa28c9-49a4-ac0a-51c5-e3587f46603d@virtuozzo.com>

On 2/27/20 7:59 AM, Vladimir Sementsov-Ogievskiy wrote:

>> Hmm - I think it may be worth a tweak to qcow2.txt to call out:
>>
>> 104: compression_type
>> 105 - 111: padding, must be 0
>>
>> or else call out:
>>
>> 104-111: compression type
>>
>> and just blindly use all 8 bytes for the value even though really only 
>> 1 or two values will ever be defined.  Of course, that moves the byte 
>> in question from 104 to 111, thanks to our big endian encoding, but as 
>> this series is the first one installing a non-zero value in those 8 
>> bytes, and as we just finished documenting that the header length must 
>> be a multiple of 8, there is no real impact - we can make such tweaks 
>> up until the 5.0 release.
> 
> But what is the benefit? We have already documented padding in the spec, 
> and discussed it so much time... What is the problem with padding? And 
> why to add 8 bytes for every new feature which needs only one byte?

Okay, so requiring an 8-byte field is not necessary.  But still, at 
least mentioning padding bytes (that may be assigned meanings later) is 
consistent with the rest of the document (for example, we have padding 
bits documented for the compatible/incompatible/autoclear feature bits), 
and reminds implementers to keep size rounded to a multiple of 8.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-02-27 14:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27  7:29 [PATCH v1 0/8] qcow2: Implement zstd cluster compression method Denis Plotnikov
2020-02-27  7:29 ` [PATCH v1 1/8] qcow2: introduce compression type feature Denis Plotnikov
2020-02-27  8:21   ` Vladimir Sementsov-Ogievskiy
2020-02-27 13:24     ` Eric Blake
2020-02-27 13:48   ` Eric Blake
2020-02-27 13:59     ` Vladimir Sementsov-Ogievskiy
2020-02-27 14:13       ` Eric Blake [this message]
2020-02-27 14:30         ` Vladimir Sementsov-Ogievskiy
2020-02-27 14:39           ` Eric Blake
2020-02-28  8:34     ` Denis Plotnikov
2020-02-27  7:29 ` [PATCH v1 2/8] qcow2: rework the cluster compression routine Denis Plotnikov
2020-02-27  8:54   ` Vladimir Sementsov-Ogievskiy
2020-02-27  7:29 ` [PATCH v1 3/8] qcow2: add zstd cluster compression Denis Plotnikov
2020-02-27  9:55   ` Vladimir Sementsov-Ogievskiy
2020-02-27 14:11     ` Denis Plotnikov
2020-02-27 14:18       ` Vladimir Sementsov-Ogievskiy
2020-02-28 11:59         ` Denis Plotnikov
2020-02-27 14:01   ` Eric Blake
2020-02-28 11:40     ` Denis Plotnikov
2020-02-27  7:29 ` [PATCH v1 4/8] iotests: filter out compression_type Denis Plotnikov
2020-02-27  9:57   ` Vladimir Sementsov-Ogievskiy
2020-02-27 14:03   ` Eric Blake
2020-02-28 11:53     ` Denis Plotnikov
2020-02-27  7:29 ` [PATCH v1 5/8] iotests: fix header size, feature table size and backing file offset Denis Plotnikov
2020-02-27  9:59   ` Vladimir Sementsov-Ogievskiy
2020-02-27  7:29 ` [PATCH v1 6/8] iotests: add "compression type" for test output matching Denis Plotnikov
2020-02-27 10:04   ` Vladimir Sementsov-Ogievskiy
2020-02-27 10:09     ` Vladimir Sementsov-Ogievskiy
2020-02-27 14:06       ` Eric Blake
2020-02-28  8:13       ` Denis Plotnikov
2020-02-27  7:29 ` [PATCH v1 7/8] iotests: 080: update header size value because of adding compression type Denis Plotnikov
2020-02-27  7:29 ` [PATCH v1 8/8] iotests: 287: add qcow2 compression type test Denis Plotnikov
2020-02-27 10:29   ` Vladimir Sementsov-Ogievskiy
2020-02-28  8:23     ` Denis Plotnikov
2020-02-28  8:32       ` Vladimir Sementsov-Ogievskiy

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=e93ca287-07c0-c6f9-c490-31954bcde274@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.