From: Or Ozeri <oro@il.ibm.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, berrange@redhat.com, qemu-block@nongnu.org,
dannyh@il.ibm.com, oro@il.ibm.com, idryomov@gmail.com,
to.my.trociny@gmail.com
Subject: [PATCH v1] block/raw-format: implement .bdrv_get_specific_info handler
Date: Wed, 7 Jul 2021 08:35:43 +0300 [thread overview]
Message-ID: <20210707053543.2521677-1-oro@il.ibm.com> (raw)
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>
---
block/raw-format.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/block/raw-format.c b/block/raw-format.c
index 7717578ed6..f6e70e2356 100644
--- a/block/raw-format.c
+++ b/block/raw-format.c
@@ -369,6 +369,12 @@ static int raw_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
return bdrv_get_info(bs->file->bs, bdi);
}
+static ImageInfoSpecific *raw_get_specific_info(BlockDriverState *bs,
+ Error **errp)
+{
+ return bdrv_get_specific_info(bs->file->bs, errp);
+}
+
static void raw_refresh_limits(BlockDriverState *bs, Error **errp)
{
if (bs->probed) {
@@ -603,6 +609,7 @@ BlockDriver bdrv_raw = {
.has_variable_length = true,
.bdrv_measure = &raw_measure,
.bdrv_get_info = &raw_get_info,
+ .bdrv_get_specific_info = &raw_get_specific_info,
.bdrv_refresh_limits = &raw_refresh_limits,
.bdrv_probe_blocksizes = &raw_probe_blocksizes,
.bdrv_probe_geometry = &raw_probe_geometry,
--
2.27.0
next reply other threads:[~2021-07-07 5:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 5:35 Or Ozeri [this message]
2021-07-07 7:51 ` [PATCH v1] block/raw-format: implement .bdrv_get_specific_info handler Kevin Wolf
[not found] ` <OFCAC1F821.335F9C72-ON0025870B.00309CB1-0025870B.00309CB5@ibm.com>
2021-07-07 12:31 ` Kevin Wolf
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=20210707053543.2521677-1-oro@il.ibm.com \
--to=oro@il.ibm.com \
--cc=berrange@redhat.com \
--cc=dannyh@il.ibm.com \
--cc=idryomov@gmail.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=to.my.trociny@gmail.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).