qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, hreitz@redhat.com,
	eblake@redhat.com, armbru@redhat.com
Subject: [PATCH v3 2/2] block/qapi: make @node-name in @BlockDeviceInfo non-optional
Date: Wed,  2 Jul 2025 14:31:28 +0200	[thread overview]
Message-ID: <20250702123204.325470-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20250702123204.325470-1-f.ebner@proxmox.com>

Since commit 15489c769b ("block: auto-generated node-names"), if the
node name of a block driver state is not explicitly specified, it
will be auto-generated.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

New in v3.

 block/qapi.c         | 4 +---
 qapi/block-core.json | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/block/qapi.c b/block/qapi.c
index e08a1e970f..12fbf8d1b7 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -75,9 +75,7 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
         .no_flush       = !!(bs->open_flags & BDRV_O_NO_FLUSH),
     };
 
-    if (bs->node_name[0]) {
-        info->node_name = g_strdup(bs->node_name);
-    }
+    info->node_name = g_strdup(bs->node_name);
 
     children_list_tail = &info->children;
     QLIST_FOREACH(child, &bs->children, next) {
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 3e720af5ad..9d36927fc1 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -573,7 +573,7 @@
 # Since: 0.14
 ##
 { 'struct': 'BlockDeviceInfo',
-  'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
+  'data': { 'file': 'str', 'node-name': 'str', 'ro': 'bool', 'drv': 'str',
             '*backing_file': 'str', 'backing_file_depth': 'int',
             'children': ['BlockdevChild'],
             'active': 'bool', 'encrypted': 'bool',
-- 
2.47.2




  parent reply	other threads:[~2025-07-02 12:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 12:31 [PATCH v3 0/2] block/qapi: include child references in block device info Fiona Ebner
2025-07-02 12:31 ` [PATCH v3 1/2] " Fiona Ebner
2025-07-02 12:31 ` Fiona Ebner [this message]
2025-07-14 15:11 ` [PATCH v3 0/2] " 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=20250702123204.325470-3-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@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 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).