[PATCH v4 qemu-server 19/19] monitor: rename qsd_peer() to qsd_qmp_peer()

Fiona Ebner
2026-04-24T12:24:31Z

For better consistency with vm_qmp_peer().

Suggested-by: Lukas Sichert <l.sichert@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/QemuServer/Blockdev.pm | 4 ++--
src/PVE/QemuServer/Drive.pm | 4 ++--
src/PVE/QemuServer/Monitor.pm | 6 +++---
src/PVE/QemuServer/QSD.pm | 6 +++---
4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/PVE/QemuServer/Blockdev.pm b/src/PVE/QemuServer/Blockdev.pm
index b9430a56..101c747c 100644
--- a/src/PVE/QemuServer/Blockdev.pm
+++ b/src/PVE/QemuServer/Blockdev.pm
@@ -14,7 +14,7 @@ use PVE::Storage;
use PVE::QemuServer::Drive qw(drive_is_cdrom);
use PVE::QemuServer::Helpers;
use PVE::QemuServer::Machine;
-use PVE::QemuServer::Monitor qw(mon_cmd qmp_cmd qsd_peer vm_qmp_peer);
+use PVE::QemuServer::Monitor qw(mon_cmd qmp_cmd qsd_qmp_peer vm_qmp_peer);

use base qw(Exporter);

@@ -594,7 +594,7 @@ state image.
sub attach {
my ($storecfg, $id, $drive, $options) = @_;

- my $qmp_peer = $options->{qsd} ? qsd_peer($id) : vm_qmp_peer($id);
+ my $qmp_peer = $options->{qsd} ? qsd_qmp_peer($id) : vm_qmp_peer($id);

my $machine_version;
if ($options->{qsd}) { # qemu-storage-daemon runs with the installed binary version
diff --git a/src/PVE/QemuServer/Drive.pm b/src/PVE/QemuServer/Drive.pm
index 79afc146..625ed80c 100644
--- a/src/PVE/QemuServer/Drive.pm
+++ b/src/PVE/QemuServer/Drive.pm
@@ -13,7 +13,7 @@ use PVE::Storage;
use PVE::Storage::Common;
use PVE::JSONSchema qw(get_standard_option);

-use PVE::QemuServer::Monitor qw(qsd_peer vm_qmp_peer);
+use PVE::QemuServer::Monitor qw(qsd_qmp_peer vm_qmp_peer);

use base qw(Exporter);

@@ -1169,7 +1169,7 @@ sub drive_uses_qsd_fuse {
sub drive_qmp_peer {
my ($storecfg, $vmid, $drive) = @_;

- return drive_uses_qsd_fuse($storecfg, $drive) ? qsd_peer($vmid) : vm_qmp_peer($vmid);
+ return drive_uses_qsd_fuse($storecfg, $drive) ? qsd_qmp_peer($vmid) : vm_qmp_peer($vmid);
}

1;
diff --git a/src/PVE/QemuServer/Monitor.pm b/src/PVE/QemuServer/Monitor.pm
index 1b1ce4ea..c6e7193c 100644
--- a/src/PVE/QemuServer/Monitor.pm
+++ b/src/PVE/QemuServer/Monitor.pm
@@ -11,7 +11,7 @@ use base 'Exporter';
our @EXPORT_OK = qw(
mon_cmd
qmp_cmd
- qsd_peer
+ qsd_qmp_peer
vm_qmp_peer
);

@@ -110,7 +110,7 @@ sub vm_qmp_peer {
return { name => "VM $vmid", id => $vmid, type => 'qmp' };
}

-sub qsd_peer {
+sub qsd_qmp_peer {
my ($id) = @_;

return { name => "QEMU storage daemon $id", id => $id, type => 'qsd' };
@@ -119,7 +119,7 @@ sub qsd_peer {
sub qsd_cmd {
my ($id, $execute, %params) = @_;

- return qmp_cmd(qsd_peer($id), $execute, %params);
+ return qmp_cmd(qsd_qmp_peer($id), $execute, %params);
}

sub mon_cmd {
diff --git a/src/PVE/QemuServer/QSD.pm b/src/PVE/QemuServer/QSD.pm
index bb85085a..5ee76293 100644
--- a/src/PVE/QemuServer/QSD.pm
+++ b/src/PVE/QemuServer/QSD.pm
@@ -11,7 +11,7 @@ use PVE::Tools;

use PVE::QemuServer::Blockdev;
use PVE::QemuServer::Helpers;
-use PVE::QemuServer::Monitor qw(qsd_peer);
+use PVE::QemuServer::Monitor qw(qsd_qmp_peer);

=head3 start

@@ -25,7 +25,7 @@ sub start($id) {
# If something is still mounted, that could block the new instance, try to clean up first.
PVE::QemuServer::Helpers::qsd_fuse_export_cleanup_files($id);

- my $qmp_socket_path = PVE::QemuServer::Helpers::qmp_socket(qsd_peer($id));
+ my $qmp_socket_path = PVE::QemuServer::Helpers::qmp_socket(qsd_qmp_peer($id));
my $pidfile = PVE::QemuServer::Helpers::qsd_pidfile_name($id);

my $cmd = [
@@ -131,7 +131,7 @@ sub quit($id) {
}

unlink PVE::QemuServer::Helpers::qsd_pidfile_name($id);
- unlink PVE::QemuServer::Helpers::qmp_socket(qsd_peer($id));
+ unlink PVE::QemuServer::Helpers::qmp_socket(qsd_qmp_peer($id));

PVE::QemuServer::Helpers::qsd_fuse_export_cleanup_files($id);

--
2.47.3