From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v2 03/12] block/vmdk: Change extent info type
Date: Mon, 30 Jan 2023 11:56:49 +0100 [thread overview]
Message-ID: <Y9eiccNn2UJgxxiB@redhat.com> (raw)
In-Reply-To: <20230127230625.zo3vw7fkxjv5yvki@redhat.com>
Am 28.01.2023 um 00:06 hat Eric Blake geschrieben:
> On Thu, Jan 19, 2023 at 04:20:16PM +0100, Kevin Wolf wrote:
> > Am 20.06.2022 um 18:26 hat Hanna Reitz geschrieben:
> > > VMDK's implementation of .bdrv_get_specific_info() returns information
> > > about its extent files, ostensibly in the form of ImageInfo objects.
> > > However, it does not get this information through
> > > bdrv_query_image_info(), but fills only a select few fields with custom
> > > information that does not always match the fields' purposes.
> > >
> > > For example, @format, which is supposed to be a block driver name, is
> > > filled with the extent type, e.g. SPARSE or FLAT.
> > >
> > > In ImageInfo, @compressed shows whether the data that can be seen in the
> > > image is stored in compressed form or not. For example, a compressed
> > > qcow2 image will store compressed data in its data file, but when
> > > accessing the qcow2 node, you will see normal data. This is not how
> > > VMDK uses the @compressed field for its extent files: Instead, it
> > > signifies whether accessing the extent file will yield compressed data
> > > (which the VMDK driver then (de-)compresses).
> >
> > Actually, VMDK was the only user of the field in ImageInfo. qcow2
> > doesn't set the field at all because it would have to parse all L2
> > tables in order to set it.
> >
> > So I suppose @compressed can now be removed from ImageInfo?
>
> I think you are okay for VMDK (the new struct has the same field
> names, but better meanings, and the on-the-wire representation for
> someone querying a known-VMDK image doesn't change). For non-VMDK,
> any code that was querying @compressed will break, but arguably no one
> was doing that since it would have always been false. If we want to
> be super-conservative, we deprecate the field now and only remove it
> from ImageInfo in a later release, but I'd rather trust Markus on this
> decision.
It is an optional field and VMDK is the only driver that ever provided
it, and only in the context of extent information. In this case, the
information on the wire stays the same after this patch.
So I don't think there is any visible difference for a client, apart
from schema introspection?
> On a side note - would it be worth adding a bit to the qcow2 header
> (one of the compatible_feature bits seems best) which we set when
> writing a compressed cluster, so that on newer images, it is an O(1)
> probe of whether the image contains (or at least has contained in the
> past) a compressed cluster? Or is that going to add needless overhead
> for something we really don't need to know all that often?
I think the only use for it would be displaying it in 'qemu-img info'.
Would you combine two bits then? One for "compressed bit is valid" and
one for "contains compressed clusters"? Because with one bit you can
only distinguish "compressed" from "don't know", but there wouldn't be a
way to say for certain that an image is uncompressed.
Kevin
next prev parent reply other threads:[~2023-01-30 10:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 16:26 [PATCH v2 00/12] qemu-img info: Show protocol-level information Hanna Reitz
2022-06-20 16:26 ` [PATCH v2 01/12] block: Improve empty format-specific info dump Hanna Reitz
2023-01-19 14:00 ` Kevin Wolf
2023-01-20 13:35 ` Hanna Czenczek
2023-01-20 14:08 ` Kevin Wolf
2022-06-20 16:26 ` [PATCH v2 02/12] block/file: Add file-specific image info Hanna Reitz
2023-01-27 23:00 ` Eric Blake
2022-06-20 16:26 ` [PATCH v2 03/12] block/vmdk: Change extent info type Hanna Reitz
2023-01-19 15:20 ` Kevin Wolf
2023-01-20 13:43 ` Hanna Czenczek
2023-01-27 23:06 ` Eric Blake
2023-01-30 10:56 ` Kevin Wolf [this message]
2022-06-20 16:26 ` [PATCH v2 04/12] block: Split BlockNodeInfo off of ImageInfo Hanna Reitz
2022-06-20 16:26 ` [PATCH v2 05/12] qemu-img: Use BlockNodeInfo Hanna Reitz
2022-06-20 16:26 ` [PATCH v2 06/12] block/qapi: Let bdrv_query_image_info() recurse Hanna Reitz
2022-06-20 16:26 ` [PATCH v2 07/12] block/qapi: Introduce BlockGraphInfo Hanna Reitz
2022-06-20 16:27 ` [PATCH v2 08/12] block/qapi: Add indentation to bdrv_node_info_dump() Hanna Reitz
2022-06-20 16:27 ` [PATCH v2 09/12] iotests: Filter child node information Hanna Reitz
2022-06-20 16:27 ` [PATCH v2 10/12] iotests/106, 214, 308: Read only one size line Hanna Reitz
2022-06-20 16:27 ` [PATCH v2 11/12] qemu-img: Let info print block graph Hanna Reitz
2022-06-20 16:27 ` [PATCH v2 12/12] qemu-img: Change info key names for protocol nodes Hanna Reitz
2022-12-08 12:24 ` [PATCH v2 00/12] qemu-img info: Show protocol-level information Hanna Reitz
2023-01-19 20:12 ` Kevin Wolf
2023-01-20 13:44 ` Hanna Czenczek
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=Y9eiccNn2UJgxxiB@redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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.