From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 06CA21FF0E2 for ; Thu, 30 Jul 2026 15:18:27 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id B128E2158C; Thu, 30 Jul 2026 15:17:53 +0200 (CEST) From: Fiona Ebner 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 Message-ID: <20260730131613.157722-7-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260730131613.157722-1-f.ebner@proxmox.com> References: <20260730131613.157722-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1785417458379 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.157 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: E46QXJJEAQBWLDF5SSCEJXBFORLGEXWY X-Message-ID-Hash: E46QXJJEAQBWLDF5SSCEJXBFORLGEXWY X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Fiona Ebner --- 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