[pve-devel] applied: [PATCH storage] Fix #1913: copy plugindata in get_vm_disknumber

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Sep 14 09:32:20 CEST 2018


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.ivanov at 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!




More information about the pve-devel mailing list