From: Fiona Ebner <f.ebner@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
"Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Subject: [pve-devel] applied: [PATCH qemu-server] fix #6562: fix blockdev_replace for dir-based storages
Date: Thu, 24 Jul 2025 16:45:36 +0200 [thread overview]
Message-ID: <1fb2f712-6a7c-43f8-9d2e-ec1cc8d50ac7@proxmox.com> (raw)
In-Reply-To: <20250724121042.473947-1-f.gruenbichler@proxmox.com>
Am 24.07.25 um 2:10 PM schrieb Fabian Grünbichler:
> avoid calling qemu_blockdev_options on a volid+snapshot that is potentially
> already invalid if it has been removed/renamed by the storage layer. instead,
> generate the node name of the old node that we want to replace/remove directly,
> since nothing besides the name is used in this code path anyway..
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Applied, with 'make tidy' squashed in, thanks!
[1/1] fix #6562: fix blockdev_replace for dir-based storages
commit: 6898a72b54358863835de16372f1eabc035de915
> @@ -955,8 +946,8 @@ sub blockdev_replace {
>
> # delete old file|fmt nodes
> # add eval as reopen is auto removing the old nodename automatically only if it was created at vm start in command line argument
> - eval { mon_cmd($vmid, 'blockdev-del', 'node-name' => $src_file_blockdev->{'node-name'}) };
> - eval { mon_cmd($vmid, 'blockdev-del', 'node-name' => $src_fmt_blockdev->{'node-name'}) };
> + eval { mon_cmd($vmid, 'blockdev-del', 'node-name' => $src_file_blockdev_name) };
> + eval { mon_cmd($vmid, 'blockdev-del', 'node-name' => $src_fmt_blockdev_name) };
Also made a follow-up here to fix the pre-existing wrong deletion
ordering. Nodes that are further up in the chain need to be removed
first. It's just that nodes that are not added via blockdev-add are
automatically dropped and I suppose that's the case for the file node
here, so it probably doesn't matter in practice.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-07-24 14:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 12:10 [pve-devel] " Fabian Grünbichler
2025-07-24 14:45 ` Fiona Ebner [this message]
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=1fb2f712-6a7c-43f8-9d2e-ec1cc8d50ac7@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=f.gruenbichler@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox