From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 8/8] block job: monitor: properly document function
Date: Thu, 30 Jul 2026 15:15:57 +0200 [thread overview]
Message-ID: <20260730131613.157722-9-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 | 56 +++++++++++++++++++++++++++++++---
1 file changed, 51 insertions(+), 5 deletions(-)
diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm
index 5fbc311e..2f4bf3cc 100644
--- a/src/PVE/QemuServer/BlockJob.pm
+++ b/src/PVE/QemuServer/BlockJob.pm
@@ -108,11 +108,57 @@ my sub print_job_status {
return;
}
-# $completion can be either
-# 'complete': wait until all jobs are ready, job-complete them (default)
-# 'cancel': wait until all jobs are ready, block-job-cancel them
-# '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
+=head3 monitor
+
+Monitor the given jobs C<$jobs> and handle them according to the mode C<$completion>.
+
+=over
+
+=item C<$qmp_peer>: The QMP peer which is executing the jobs.
+
+=item C<$jobs>: Hash reference with job IDs that should be handled. With optional, additional
+information:
+
+=over
+
+=item C<< $jobs->{$job_id}->{'source-node-name'} >>: (optional, used by mirror) Name of the source
+block node. Will be detached upon completion.
+
+=item C<< $jobs->{$job_id}->{'target-node-name'} >>: (optional, used by mirror) Name of the target
+block node. Will be detached upon cancel.
+
+=back
+
+=item C<$completion>: How to handle the jobs:
+
+=over
+
+=item C<'complete'>: wait until all jobs are ready, job-complete them (default)
+
+=item C<'cancel'>: wait until all jobs are ready, block-job-cancel them
+
+=item C<'skip'>: wait until all jobs are ready, return with block jobs in ready state
+
+=item C<'auto'>: wait until all jobs disappear, only use for jobs which complete automatically
+
+=back
+
+=item C<$operation>: Name of the block job operation.
+
+=item C<$options>: Additional options:
+
+=over
+
+=item C<< $options->{qga} >>: Guest agent string to be considered for guest filesystem freezing.
+
+=item C<< $options->{'dest-vmid'} >>: VM ID of the target of the job.
+
+=back
+
+=back
+
+=cut
+
sub monitor {
my ($qmp_peer, $jobs, $completion, $operation, $options) = @_;
--
2.47.3
prev 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 ` [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 ` Fiona Ebner [this message]
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-9-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.