Am 19.06.23 um 11:29 schrieb Aaron Lauterer:
>  
> @@ -4876,11 +4876,13 @@ sub foreach_volid {
>       $volhash->{$volid}->{shared} = 1 if $drive->{shared};
>  
>       $volhash->{$volid}->{referenced_in_config} //= 0;
> -     $volhash->{$volid}->{referenced_in_config} = 1 if !defined($snapname);
> +     $volhash->{$volid}->{referenced_in_config} = 1 if !defined($snapname) 
> && !defined($pending);

Nit: I would've made $pending behave like a boolean, i.e. check for
$pending rather than defined($pending). $snapname is a string, so there
one wouldn't accidentally pass in an explicit 0.

>  
>       $volhash->{$volid}->{referenced_in_snapshot}->{$snapname} = 1
>           if defined($snapname);
>  
> +     $volhash->{$volid}->{referenced_in_pending} = 1 if defined($pending);
> +

Same.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to