all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v2 2/7] agent: rename guest_fs{freeze,thaw} to guest_fs_{freeze,thaw}
Date: Thu, 23 Apr 2026 14:35:13 +0200	[thread overview]
Message-ID: <20260423124004.115303-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260423124004.115303-1-f.ebner@proxmox.com>

For better consistency with should_fs_freeze().

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

New in v2.

 src/PVE/QMPClient.pm           |  2 +-
 src/PVE/QemuConfig.pm          |  4 ++--
 src/PVE/QemuServer/Agent.pm    | 14 +++++++-------
 src/PVE/QemuServer/BlockJob.pm |  4 ++--
 src/PVE/VZDump/QemuServer.pm   |  4 ++--
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/PVE/QMPClient.pm b/src/PVE/QMPClient.pm
index 723123a6..bb4c5275 100644
--- a/src/PVE/QMPClient.pm
+++ b/src/PVE/QMPClient.pm
@@ -108,7 +108,7 @@ sub cmd {
         } elsif ($cmd->{execute} =~ m/^(eject|change)/) {
             $timeout = 60; # note: cdrom mount command is slow
         } elsif ($cmd->{execute} eq 'guest-fsfreeze-freeze') {
-            # consider using the guest_fsfreeze() helper in Agent.pm
+            # consider using the guest_fs_freeze() helper in Agent.pm
             #
             # freeze syncs all guest FS, if we kill it it stays in an unfreezable
             # locked state with high probability, so use an generous timeout
diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index 839b6cd0..f93ee5bb 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -309,10 +309,10 @@ sub __snapshot_freeze {
     my ($class, $vmid, $unfreeze) = @_;
 
     if ($unfreeze) {
-        eval { PVE::QemuServer::Agent::guest_fsthaw($vmid); };
+        eval { PVE::QemuServer::Agent::guest_fs_thaw($vmid); };
         warn "guest-fsfreeze-thaw problems - $@" if $@;
     } else {
-        eval { PVE::QemuServer::Agent::guest_fsfreeze($vmid); };
+        eval { PVE::QemuServer::Agent::guest_fs_freeze($vmid); };
         warn $@ if $@;
     }
 }
diff --git a/src/PVE/QemuServer/Agent.pm b/src/PVE/QemuServer/Agent.pm
index ec3827d6..a68dd8d7 100644
--- a/src/PVE/QemuServer/Agent.pm
+++ b/src/PVE/QemuServer/Agent.pm
@@ -193,9 +193,9 @@ sub should_fs_freeze($conf) {
     return $agent->{'freeze-fs'} // 1;
 }
 
-=head3 guest_fsfreeze
+=head3 guest_fs_freeze
 
-    guest_fsfreeze($vmid);
+    guest_fs_freeze($vmid);
 
 Freeze the file systems of the guest C<$vmid>. Check that the guest agent is enabled and running
 before calling this function. Dies if the file systems cannot be frozen.
@@ -216,7 +216,7 @@ the time the socket is blocked after a lost command is at most 10 minutes.
 
 =cut
 
-sub guest_fsfreeze($vmid) {
+sub guest_fs_freeze($vmid) {
     my $timeout = 10 * 60;
 
     my $result = eval {
@@ -259,17 +259,17 @@ sub guest_fsfreeze($vmid) {
     die "unable to freeze guest fs - unexpected status '$status'\n" if $status ne 'frozen';
 }
 
-=head3 guest_fsthaw
+=head3 guest_fs_thaw
 
-    guest_fsthaw($vmid);
+    guest_fs_thaw($vmid);
 
 Thaws the file systems of the guest C<$vmid>. Dies if the file systems cannot be thawed.
 
-See C<$guest_fsfreeze> for more details.
+See C<guest_fs_freeze()> for more details.
 
 =cut
 
-sub guest_fsthaw($vmid) {
+sub guest_fs_thaw($vmid) {
     my $res = PVE::QemuServer::Monitor::mon_cmd($vmid, "guest-fsfreeze-thaw");
     check_agent_error($res, "unable to thaw guest filesystem");
 
diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm
index d7c78741..2b14a679 100644
--- a/src/PVE/QemuServer/BlockJob.pm
+++ b/src/PVE/QemuServer/BlockJob.pm
@@ -165,7 +165,7 @@ sub monitor {
                     my $should_fsfreeze = $qga && qga_check_running($vmid);
                     if ($should_fsfreeze) {
                         print "issuing guest agent 'guest-fsfreeze-freeze' command\n";
-                        eval { PVE::QemuServer::Agent::guest_fsfreeze($vmid); };
+                        eval { PVE::QemuServer::Agent::guest_fs_freeze($vmid); };
                         warn $@ if $@;
                     } else {
                         if (!$qga) {
@@ -185,7 +185,7 @@ sub monitor {
 
                     if ($should_fsfreeze) {
                         print "issuing guest agent 'guest-fsfreeze-thaw' command\n";
-                        eval { PVE::QemuServer::Agent::guest_fsthaw($vmid); };
+                        eval { PVE::QemuServer::Agent::guest_fs_thaw($vmid); };
                         warn $@ if $@;
                     } else {
                         print "resume vm\n";
diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index 32f92829..ca4a8513 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -1116,7 +1116,7 @@ sub qga_fs_freeze {
     }
 
     $self->loginfo("issuing guest-agent 'fs-freeze' command");
-    eval { PVE::QemuServer::Agent::guest_fsfreeze($vmid); };
+    eval { PVE::QemuServer::Agent::guest_fs_freeze($vmid); };
     $self->logerr($@) if $@;
 
     return 1; # even on error, ensure we always thaw again
@@ -1127,7 +1127,7 @@ sub qga_fs_thaw {
     my ($self, $vmid) = @_;
 
     $self->loginfo("issuing guest-agent 'fs-thaw' command");
-    eval { PVE::QemuServer::Agent::guest_fsthaw($vmid); };
+    eval { PVE::QemuServer::Agent::guest_fs_thaw($vmid); };
     $self->logerr($@) if $@;
 }
 
-- 
2.47.3





  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 ` Fiona Ebner [this message]
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 ` [PATCH qemu-server v2 4/7] agent: should fs freeze: " Fiona Ebner
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-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal