qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] block/raw-format: implement .bdrv_get_specific_info handler
@ 2021-07-07  5:35 Or Ozeri
  2021-07-07  7:51 ` Kevin Wolf
       [not found] ` <OFCAC1F821.335F9C72-ON0025870B.00309CB1-0025870B.00309CB5@ibm.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Or Ozeri @ 2021-07-07  5:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: kwolf, berrange, qemu-block, dannyh, oro, idryomov, to.my.trociny

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-07 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-07  5:35 [PATCH v1] block/raw-format: implement .bdrv_get_specific_info handler Or Ozeri
2021-07-07  7:51 ` Kevin Wolf
     [not found] ` <OFCAC1F821.335F9C72-ON0025870B.00309CB1-0025870B.00309CB5@ibm.com>
2021-07-07 12:31   ` Kevin Wolf

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).