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 5/8] block job: monitor: make operation argument non-optional
Date: Thu, 30 Jul 2026 15:15:54 +0200	[thread overview]
Message-ID: <20260730131613.157722-6-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260730131613.157722-1-f.ebner@proxmox.com>

There is nothing special about mirror other than being the first block
job handled by the monitor() function.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuMigrate.pm         | 7 ++++++-
 src/PVE/QemuServer.pm          | 2 +-
 src/PVE/QemuServer/BlockJob.pm | 3 +--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index 8da6f15d..604eae82 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -1581,7 +1581,12 @@ sub phase2 {
         # thus, this command changes to it to blockjob complete (see qapi docs)
         eval {
             PVE::QemuServer::BlockJob::monitor(
-                vm_qmp_peer($vmid), undef, $self->{storage_migration_jobs}, 'cancel',
+                vm_qmp_peer($vmid),
+                undef,
+                $self->{storage_migration_jobs},
+                'cancel',
+                undef,
+                'mirror',
             );
         };
         if (my $err = $@) {
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 9aec7f9c..1be89be9 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -8010,7 +8010,7 @@ sub clone_disk {
             # previous drive-mirrors
             if (($completion && $completion eq 'complete') && (scalar(keys %$jobs) > 0)) {
                 PVE::QemuServer::BlockJob::monitor(
-                    vm_qmp_peer($vmid), $newvmid, $jobs, $completion, $qga,
+                    vm_qmp_peer($vmid), $newvmid, $jobs, $completion, $qga, 'mirror',
                 );
             }
             goto no_data_clone;
diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm
index 14d814ee..3b105c37 100644
--- a/src/PVE/QemuServer/BlockJob.pm
+++ b/src/PVE/QemuServer/BlockJob.pm
@@ -120,7 +120,6 @@ sub monitor {
         if $vmiddst && $qmp_peer->{type} ne 'qmp';
 
     $completion //= 'complete';
-    $op //= "mirror";
 
     eval {
         my $ready_message_printed;
@@ -341,7 +340,7 @@ sub qemu_drive_mirror {
         die "mirroring error: $err\n";
     }
 
-    monitor(vm_qmp_peer($vmid), $vmiddst, $jobs, $completion, $qga);
+    monitor(vm_qmp_peer($vmid), $vmiddst, $jobs, $completion, $qga, 'mirror');
 }
 
 # Callers should version guard this (only available with a binary >= QEMU 8.2)
-- 
2.47.3





  parent reply	other threads:[~2026-07-30 13:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 13:15 [PATCH-SERIES qemu-server 0/8] block job: monitor: improve completion handling and style Fiona Ebner
2026-07-30 13:15 ` [PATCH qemu-server 1/8] block job: monitor: avoid duplicate completion Fiona Ebner
2026-07-30 13:15 ` [PATCH qemu-server 2/8] block job: monitor: only print message that jobs are ready once Fiona Ebner
2026-07-30 13:15 ` [PATCH qemu-server 3/8] partially fix #7854: block job: monitor: handle completion faster to benefit migration Fiona Ebner
2026-07-30 13:15 ` [PATCH qemu-server 4/8] block job: monitor: factor out job status printing Fiona Ebner
2026-07-30 13:15 ` Fiona Ebner [this message]
2026-07-30 13:15 ` [PATCH qemu-server 6/8] block job: monitor: rename 'op' argument to 'operation' Fiona Ebner
2026-07-30 13:15 ` [PATCH qemu-server 7/8] block job: monitor: pass options as a hash Fiona Ebner
2026-07-30 13:15 ` [PATCH qemu-server 8/8] block job: monitor: properly document function 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=20260730131613.157722-6-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