[PATCH qemu-server v2 2/7] agent: rename guest_fs{freeze,thaw} to guest_fs_{freeze,thaw}

Fiona Ebner
2026-04-23T12:40:54Z

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