Re: [pve-devel] [PATCH storage 13/26] plugin, btrfs: update list_images and list_volumes

Fiona Ebner
2025-07-30T08:40:34Z

Am 30.07.25 um 10:37 AM schrieb Fabian Grünbichler:
> On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
>> +sub foreach_guest_file : prototype($$) {
>
> should this go into PVE::Storage::Common?
>
>> + my ($dir, $code) = @_;
>> +
>> + $MAX_VMID = get_standard_option("pve-vmid")->{maximum} if !defined($MAX_VMID);
>
>> +
>> + dir_glob_foreach(
>> + $dir,
>> + qr/\d+/,
>> + sub {
>> + my ($vmid) = @_;
>> + $vmid = int($vmid);
>> + return if $vmid < 100 || $vmid > $MAX_VMID;
>
> this now means list_images lists less than before - somebody might have
> used a very high ID as a placeholder not realizing its outside the "allowed" range..
>
> not sure it's worth it to have this restriction here..

Or a low ID as placeholder ;)