[pve-devel] [PATCH v4 pve-storage 3/5] storage: vdisk_free: remove external snapshots

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Mon Apr 7 13:29:34 CEST 2025


> + next if $snapid eq 'current';
> + next if !$snap->{volid};
> + next if !$snap->{ext};
> + my ($snap_storeid, $snap_volname) = parse_volume_id($snap-
> >{volid});
> + my (undef, undef, undef, undef, undef, $snap_isBase, $snap_format)
> =
> +     $plugin->parse_volname($volname);
> + $plugin->free_image($snap_storeid, $scfg, $snap_volname,
> $snap_isBase, $snap_format);
> +     }
> +     $plugin->free_image($storeid, $scfg, $volname, $isBase,
> $format);

>>this is the wrong place to do this, you need to handle this in the
>>cleanup worker returned by the plugin and still execute it here..
>>also you need to honor saferemove when cleaning up the snapshots

thinking about this, safemove is actually done as I'm using free_image
to delete snapshots




More information about the pve-devel mailing list