[pve-devel] [PATCH qemu-server v5 21/32] backup: future-proof checks for QEMU feature support

Fiona Ebner f.ebner at proxmox.com
Fri Mar 21 14:48:41 CET 2025


The features returned by the 'query-proxmox-support' QMP command are
booleans, so just checking for definedness is not enough in principle.
In practice, a feature is currently always true if defined. Still, fix
the checks, should the need to disable support for a feature ever
arise in the future and to avoid propagating the pattern further.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---

New in v5.

 PVE/VZDump/QemuServer.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index 0b22b34d..c2d64192 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -639,7 +639,7 @@ my sub check_and_prepare_fleecing {
 
     my $use_fleecing = $fleecing_opts && $fleecing_opts->{enabled} && !$is_template;
 
-    if ($use_fleecing && !defined($qemu_support->{'backup-fleecing'})) {
+    if ($use_fleecing && !$qemu_support->{'backup-fleecing'}) {
 	$self->log(
 	    'warn',
 	    "running QEMU version does not support backup fleecing - continuing without",
@@ -739,7 +739,7 @@ sub archive_pbs {
 
 	# pve-qemu supports it since 5.2.0-1 (PVE 6.4), so safe to die since PVE 8
 	die "master key configured but running QEMU version does not support master keys\n"
-	    if !defined($qemu_support->{'pbs-masterkey'}) && defined($master_keyfile);
+	    if !$qemu_support->{'pbs-masterkey'} && defined($master_keyfile);
 
 	$attach_tpmstate_drive->($self, $task, $vmid);
 
-- 
2.39.5





More information about the pve-devel mailing list