From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v2 4/7] agent: should fs freeze: change signature to take property string rather than full VM config
Date: Thu, 23 Apr 2026 14:35:15 +0200 [thread overview]
Message-ID: <20260423124004.115303-5-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260423124004.115303-1-f.ebner@proxmox.com>
Better encapsulation and in preparation to harmonize checks for freeze
while avoiding the need to pass the full config to block jobs.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
New in v2.
src/PVE/API2/Qemu.pm | 4 ++--
src/PVE/QemuConfig.pm | 2 +-
src/PVE/QemuServer/Agent.pm | 4 ++--
src/PVE/VZDump/QemuServer.pm | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index dadc06b0..e49e8dab 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -376,7 +376,7 @@ my $import_from_volid = sub {
my ($src_storeid) = PVE::Storage::parse_volume_id($src_volid);
- my $fs_freeze = PVE::QemuServer::Agent::should_fs_freeze($src_conf);
+ my $fs_freeze = PVE::QemuServer::Agent::should_fs_freeze($src_conf->{agent});
return PVE::QemuServer::clone_disk(
$storecfg,
@@ -4606,7 +4606,7 @@ __PACKAGE__->register_method({
$dest_info->{efisize} = PVE::QemuServer::get_efivars_size($oldconf)
if $opt eq 'efidisk0';
- my $fs_freeze = PVE::QemuServer::Agent::should_fs_freeze($oldconf);
+ my $fs_freeze = PVE::QemuServer::Agent::should_fs_freeze($oldconf->{agent});
my $newdrive = PVE::QemuServer::clone_disk(
$storecfg,
diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index f93ee5bb..eedb34f9 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -297,7 +297,7 @@ sub __snapshot_check_freeze_needed {
return (
$running,
$running
- && PVE::QemuServer::Agent::should_fs_freeze($config)
+ && PVE::QemuServer::Agent::should_fs_freeze($config->{agent})
&& PVE::QemuServer::Agent::qga_check_running($vmid),
);
} else {
diff --git a/src/PVE/QemuServer/Agent.pm b/src/PVE/QemuServer/Agent.pm
index 8b814edd..e63b09f2 100644
--- a/src/PVE/QemuServer/Agent.pm
+++ b/src/PVE/QemuServer/Agent.pm
@@ -187,8 +187,8 @@ Does B<not> check whether the agent is actually running.
=cut
-sub should_fs_freeze($conf) {
- my $agent = parse_guest_agent($conf->{agent});
+sub should_fs_freeze($agent_str) {
+ my $agent = parse_guest_agent($agent_str);
return 0 if !$agent->{enabled};
return $agent->{'freeze-fs'} // 1;
}
diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index ca4a8513..9952cff1 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -1110,7 +1110,7 @@ sub qga_fs_freeze {
return;
}
- if (!PVE::QemuServer::Agent::should_fs_freeze($conf)) {
+ if (!PVE::QemuServer::Agent::should_fs_freeze($conf->{agent})) {
$self->loginfo("skipping guest-agent 'fs-freeze', disabled in VM options");
return;
}
--
2.47.3
next prev parent reply other threads:[~2026-04-23 12:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 12:35 [PATCH-SERIES qemu-server v2 0/7] fix #7383: agent: fsfreeze: skip freeze if already frozen Fiona Ebner
2026-04-23 12:35 ` [PATCH qemu-server v2 1/7] agent: migrate to v5.36 and use subroutine signatures Fiona Ebner
2026-04-23 12:35 ` [PATCH qemu-server v2 2/7] agent: rename guest_fs{freeze,thaw} to guest_fs_{freeze,thaw} Fiona Ebner
2026-04-23 12:35 ` [PATCH qemu-server v2 3/7] agent: parse: change signature to take property string rather than full VM config Fiona Ebner
2026-04-23 12:35 ` Fiona Ebner [this message]
2026-04-23 12:35 ` [PATCH qemu-server v2 5/7] clone disk/block jobs: change signatures to take guest agent property string Fiona Ebner
2026-04-23 12:35 ` [PATCH qemu-server v2 6/7] agent: fs freeze: harmonize checks for guest fs freeze Fiona Ebner
2026-04-23 12:35 ` [PATCH qemu-server v2 7/7] fix #7383: agent: fsfreeze: skip freeze if already frozen Fiona Ebner
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=20260423124004.115303-5-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