public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: applied: [PATCH qemu-server] guest fsfreeze: fix applying default value for configuration sub-property
Date: Wed,  4 Mar 2026 14:42:27 +0100	[thread overview]
Message-ID: <20260304134232.144519-1-f.ebner@proxmox.com> (raw)

The && operator has higher precedence than //, so parentheses are
needed.

Fixes: 7546da2c ("api: import: follow guest-fsfreeze setting")
Fixes: 9d359700 ("fix #1964: honor guest-fsfreeze setting for replications and snapshots")
Fixes: 08ae75f5 ("api: clone_vm: follow guest-fsfreeze setting")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/API2/Qemu.pm  | 4 ++--
 src/PVE/QemuConfig.pm | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 1f0864f5..59ff8181 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -375,7 +375,7 @@ my $import_from_volid = sub {
         my ($src_storeid) = PVE::Storage::parse_volume_id($src_volid);
 
         my $qga = $src_conf->{agent}
-            && PVE::QemuServer::Agent::get_qga_key($src_conf, 'guest-fsfreeze') // 1;
+            && (PVE::QemuServer::Agent::get_qga_key($src_conf, 'guest-fsfreeze') // 1);
 
         return PVE::QemuServer::clone_disk(
             $storecfg,
@@ -4560,7 +4560,7 @@ __PACKAGE__->register_method({
                         if $opt eq 'efidisk0';
 
                     my $qga = $oldconf->{agent}
-                        && PVE::QemuServer::Agent::get_qga_key($oldconf, 'guest-fsfreeze') // 1;
+                        && (PVE::QemuServer::Agent::get_qga_key($oldconf, 'guest-fsfreeze') // 1);
 
                     my $newdrive = PVE::QemuServer::clone_disk(
                         $storecfg,
diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index 6b90b8bb..462d1d6d 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -299,7 +299,7 @@ sub __snapshot_check_freeze_needed {
             $running
                 && PVE::QemuServer::Agent::get_qga_key($config, 'enabled')
                 && PVE::QemuServer::Agent::qga_check_running($vmid)
-                && PVE::QemuServer::Agent::get_qga_key($config, 'guest-fsfreeze') // 1,
+                && (PVE::QemuServer::Agent::get_qga_key($config, 'guest-fsfreeze') // 1),
         );
     } else {
         return ($running, 0);
-- 
2.47.3





                 reply	other threads:[~2026-03-04 13:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260304134232.144519-1-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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