From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v4 06/18] blockdev: rename variable in get_node_name_below_throttle() for readability
Date: Fri, 24 Apr 2026 13:46:40 +0200 [thread overview]
Message-ID: <20260424114722.107671-7-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260424114722.107671-1-f.ebner@proxmox.com>
The inserted node for the front-end device queried via
get_block_info() is the top node. The next commit will allow
get_node_name_below_throttle() to also query QSD, where there is no
front-end device. Part of the code can still be re-used, but the name
'inserted' would just be confusing.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Lukas Sichert <l.sichert@proxmox.com>
---
src/PVE/QemuServer/Blockdev.pm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/PVE/QemuServer/Blockdev.pm b/src/PVE/QemuServer/Blockdev.pm
index 3c27e721..c96b76da 100644
--- a/src/PVE/QemuServer/Blockdev.pm
+++ b/src/PVE/QemuServer/Blockdev.pm
@@ -170,17 +170,17 @@ sub get_node_name_below_throttle {
my $block_info = get_block_info($vmid);
my $drive_id = $device_id =~ s/^drive-//r;
- my $inserted = $block_info->{$drive_id}->{inserted}
+ my $top = $block_info->{$drive_id}->{inserted}
or die "no block node inserted for drive '$drive_id'\n";
- if ($inserted->{drv} ne 'throttle') {
- die "$device_id: unexpected top node $inserted->{'node-name'} ($inserted->{drv})\n"
+ if ($top->{drv} ne 'throttle') {
+ die "$device_id: unexpected top node $top->{'node-name'} ($top->{drv})\n"
if $assert_top_is_throttle;
# before the switch to -blockdev, the top node was not throttle
- return $inserted->{'node-name'};
+ return $top->{'node-name'};
}
- my $children = { map { $_->{child} => $_ } $inserted->{children}->@* };
+ my $children = { map { $_->{child} => $_ } $top->{children}->@* };
if (my $node_name = $children->{file}->{'node-name'}) {
return $node_name;
--
2.47.3
next prev parent reply other threads:[~2026-04-24 11:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 11:46 [PATCH-SERIES qemu-server v4 00/18] fix #7066: api: allow live snapshot (remove) of qcow2 TPM drive with snapshot-as-volume-chain Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 01/18] block job: fix variable name in documentation Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 02/18] qmp client: add default timeouts for more block commands Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 03/18] drive: introduce drive_uses_qsd_fuse() helper Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 04/18] monitor: add vm_qmp_peer() helper Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 05/18] monitor: add qsd_peer() helper Fiona Ebner
2026-04-24 11:46 ` Fiona Ebner [this message]
2026-04-24 11:46 ` [PATCH qemu-server v4 07/18] blockdev: switch get_node_name_below_throttle() to use QMP peer Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 08/18] blockdev: switch detach() " Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 09/18] blockdev: switch blockdev_replace() " Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 10/18] blockdev: switch blockdev_external_snapshot() " Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 11/18] block job: switch qemu_handle_concluded_blockjob() " Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 12/18] block job: switch qemu_blockjobs_cancel() " Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 13/18] block job: switch qemu_drive_mirror_monitor() " Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 14/18] blockdev: switch blockdev_delete() " Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 15/18] blockdev: switch blockdev_stream() " Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 16/18] blockdev: switch blockdev_commit() " Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 17/18] snapshot: support live snapshot (remove) of qcow2 TPM drive on storage with snapshot-as-volume-chain Fiona Ebner
2026-04-24 11:46 ` [PATCH qemu-server v4 18/18] fix #7066: api: allow live snapshot (remove) of qcow2 TPM drive " Fiona Ebner
2026-04-24 12:06 ` [PATCH v4 qemu-server 19/19] monitor: rename qsd_peer() to qsd_qmp_peer() Fiona Ebner
2026-04-25 17:57 ` applied: [PATCH-SERIES qemu-server v4 00/18] fix #7066: api: allow live snapshot (remove) of qcow2 TPM drive with snapshot-as-volume-chain Thomas Lamprecht
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=20260424114722.107671-7-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.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 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.