On 9/13/18 8:36 PM, Stoiko Ivanov wrote: > 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 the second access. > > Signed-off-by: Stoiko Ivanov <s.iva...@proxmox.com> > --- > PVE/Storage/Plugin.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm > index da91bdc..aefc7f8 100644 > --- a/PVE/Storage/Plugin.pm > +++ b/PVE/Storage/Plugin.pm > @@ -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/; >
applied, thanks! _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel