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.gruenbich...@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

Reply via email to