public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] update disk config: consider recorded fleecing images
@ 2025-04-22  8:09 Fiona Ebner
  2025-04-22  8:16 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2025-04-22  8:09 UTC (permalink / raw)
  To: pve-devel

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@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@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



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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] update disk config: consider recorded fleecing images
  2025-04-22  8:09 [pve-devel] [PATCH qemu-server] update disk config: consider recorded fleecing images Fiona Ebner
@ 2025-04-22  8:16 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-04-22  8:16 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Tue, 22 Apr 2025 10:09:51 +0200, Fiona Ebner wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] update disk config: consider recorded fleecing images
      commit: 4d7886174057438b6ca5b250928a01dbc15dd8ee


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-22  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-22  8:09 [pve-devel] [PATCH qemu-server] update disk config: consider recorded fleecing images Fiona Ebner
2025-04-22  8:16 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal