[pve-devel] [PATCH qemu-server] update disk config: consider recorded fleecing images
Fiona Ebner
f.ebner at proxmox.com
Tue Apr 22 10:09:51 CEST 2025
Otherwise, a rescan operation would add fleecing images as unused
disks, even if they are already recorded in the special 'fleecing'
section.
Usually, fleecing images are cleaned up directly after backup, so this
is less likely to be an issue after commit 8009da73 ("fix #6317:
backup: use correct cleanup_fleecing_images helper"), but still makes
sense for future-proofing and for other edge cases where cleanup might
have failed.
Reported-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
PVE/QemuServer.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index ccdceedc..577959a4 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6965,6 +6965,10 @@ sub update_disk_config {
$referencedpath->{$path} = 1 if $path;
});
+ if (my $fleecing = $conf->{'special-sections'}->{fleecing}) {
+ $referenced->{$_} = 1 for PVE::Tools::split_list($fleecing->{'fleecing-images'});
+ }
+
foreach my $volid (sort keys %$volid_hash) {
next if $volid =~ m/vm-$vmid-state-/;
next if $referenced->{$volid};
--
2.39.5
More information about the pve-devel
mailing list