Am 16.03.22 um 17:42 schrieb Thomas Lamprecht: > On 16.12.21 13:12, Fabian Ebner wrote: >> diff --git a/PVE/Storage.pm b/PVE/Storage.pm >> index d64019f..0643fad 100755 >> --- a/PVE/Storage.pm >> +++ b/PVE/Storage.pm >> @@ -232,6 +232,30 @@ sub update_volume_attribute { >> my $scfg = storage_config($cfg, $storeid); >> my $plugin = PVE::Storage::Plugin->lookup($scfg->{type}); >> >> + my ($vtype, undef, $vmid) = $plugin->parse_volname($volname); >> + my $max_protected_backups = $scfg->{'max-protected-backups'} // 5; > > maybe the default limit should be user privilege dependent? E.g., for root > and users > with .Allocate on the storage it wouldn't be a problem to have unlimited (or > a higher > count) as default? I mean, it's naturally a bit odd to differ, but one can > argue a lot > with auto-magic-convenience ;P >
Would add another dimension to the complexity ;) Also feels a bit awkward code-wise at a first glance, as we'd need to get the rpcenv/user in such a sub (or pass the user or pre-computed default in somehow). But if you really want to, I can give it a go for v2. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel