public inbox for pve-devel@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 6/8] block job: monitor: rename 'op' argument to 'operation'
Date: Thu, 30 Jul 2026 15:15:55 +0200	[thread overview]
Message-ID: <20260730131613.157722-7-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260730131613.157722-1-f.ebner@proxmox.com>

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuServer/BlockJob.pm | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm
index 3b105c37..d4998370 100644
--- a/src/PVE/QemuServer/BlockJob.pm
+++ b/src/PVE/QemuServer/BlockJob.pm
@@ -114,7 +114,7 @@ my sub print_job_status {
 # 'skip': wait until all jobs are ready, return with block jobs in ready state
 # 'auto': wait until all jobs disappear, only use for jobs which complete automatically
 sub monitor {
-    my ($qmp_peer, $vmiddst, $jobs, $completion, $qga, $op) = @_;
+    my ($qmp_peer, $vmiddst, $jobs, $completion, $qga, $operation) = @_;
 
     die "drive mirror: different destination is only supported when peer is main QEMU instance\n"
         if $vmiddst && $qmp_peer->{type} ne 'qmp';
@@ -127,14 +127,14 @@ sub monitor {
 
         my $starttime = time();
         while (1) {
-            die "block job ('$op') timed out\n" if $err_complete > 300;
+            die "block job ('$operation') timed out\n" if $err_complete > 300;
 
             my $stats = qmp_cmd($qmp_peer, "query-block-jobs");
             my $ctime = time();
 
             my $running_jobs = {};
             for my $stat (@$stats) {
-                next if $stat->{type} ne $op;
+                next if $stat->{type} ne $operation;
                 $running_jobs->{ $stat->{device} } = $stat;
             }
 
@@ -147,12 +147,12 @@ sub monitor {
                 my $vanished = !defined($job);
                 my $complete = defined($jobs->{$job_id}->{complete}) && $vanished;
                 if ($complete || ($vanished && $completion eq 'auto')) {
-                    print "$job_id: $op-job finished\n";
+                    print "${job_id}: ${operation}-job finished\n";
                     delete $jobs->{$job_id};
                     next;
                 }
 
-                die "$job_id: '$op' has been cancelled\n" if !defined($job);
+                die "$job_id: '$operation' has been cancelled\n" if !defined($job);
 
                 if ($job && $job->{status} eq 'concluded') {
                     qemu_handle_concluded_blockjob($qmp_peer, $job_id, $job, $jobs->{$job_id});
@@ -172,7 +172,7 @@ sub monitor {
                 $wait_time = 100_000; # everything is ready, query more often
 
                 if (!$ready_message_printed) {
-                    print "all '$op' jobs are ready\n";
+                    print "all '$operation' jobs are ready\n";
                     $ready_message_printed = 1;
                 }
 
@@ -262,7 +262,7 @@ sub monitor {
 
     if ($err) {
         eval { qemu_blockjobs_cancel($qmp_peer, $jobs) };
-        die "block job ($op) error: $err";
+        die "block job ($operation) error: $err";
     }
 }
 
-- 
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 ` [PATCH qemu-server 5/8] block job: monitor: make operation argument non-optional Fiona Ebner
2026-07-30 13:15 ` Fiona Ebner [this message]
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-7-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal