qemu-block
[Top][All Lists]
Advanced

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

RE: [PATCH v1] block/raw-format: implement .bdrv_get_specific_info handl


From: Or Ozeri
Subject: RE: [PATCH v1] block/raw-format: implement .bdrv_get_specific_info handler
Date: Wed, 7 Jul 2021 08:50:58 +0000

Would you suggest to do this child traversal on bdrv_query_image_info, and have it returned as part of the ImageInfo struct?
In that case, I would add *driver-specific to ImageInfo, in addition to the existing *format-specific?

Or should I just do the traversal in img_info (qemu-img.c), avoiding the change to the ImageInfo struct?

-----"Kevin Wolf" <kwolf@redhat.com> wrote: -----
To: "Or Ozeri" <oro@il.ibm.com>
From: "Kevin Wolf" <kwolf@redhat.com>
Date: 07/07/2021 10:52AM
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, to.my.trociny@gmail.com, dannyh@il.ibm.com, berrange@redhat.com, idryomov@gmail.com
Subject: [EXTERNAL] Re: [PATCH v1] block/raw-format: implement .bdrv_get_specific_info handler

Am 07.07.2021 um 07:35 hat Or Ozeri geschrieben:
> When using the raw format, allow exposing specific info by the underlying storage.
> In particular, this will enable RBD images using the raw format to indicate
> a LUKS2 encrypted image in the output of qemu-img info.
>
> Signed-off-by: Or Ozeri <oro@il.ibm.com>

This doesn't feel right because it would introduce an inconsistency
(drivers are supposed to return information about their layer, and all
drivers except raw would still do so) and therefore wouldn't even solve
the full problem: For non-raw images, the information isn't any less
useful, but it still wouldn't be available.

I believe the information is already available in QMP, using
query-named-block-nodes, because then you get a separate BlockDeviceInfo
(which contains ImageInfoSpecific) for each node, including the protocol
node.

So maybe what we need to do is change qemu-img to iterate the node chain
(possibly using bdrv_primary_bs()) and print the ImageInfoSpecific for
each layer if it's present, while indicating which part is for which
layer.

So the output could look like this:

...
Driver specific information (qcow2):
    compat: 0.10
    compression type: zlib
    refcount bits: 16
Driver specific information (rbd):
    encryption format: luks

Kevin




reply via email to

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