mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-01-11 05:18:01 +03:00
Fix #1913: get_vm_disk_number: clone plugindata to avoid side effects
Accessing a non-existing 'format' key in plugindata (e.g., in LvmThinPlugin), created it by autovivication, thus breaking the fallback to the default value 'raw' upon any following access. Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
9dcf88bb27
commit
f4cc2c4afe
@ -529,7 +529,7 @@ my $get_vm_disk_number = sub {
|
||||
my ($disk_name, $scfg, $vmid, $suffix) = @_;
|
||||
|
||||
my $type = $scfg->{type};
|
||||
my $def = $defaultData->{plugindata}->{$type};
|
||||
my $def = { %{$defaultData->{plugindata}->{$type}} };
|
||||
my $valid_formats = $def->{format}[0];
|
||||
|
||||
my $disk_regex = qr/(vm|base)-$vmid-disk-(\d+)$suffix/;
|
||||
|
Loading…
Reference in New Issue
Block a user