]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virDomainGetBlockJobInfo: Reword docs for fallback values
authorPeter Krempa <pkrempa@redhat.com>
Fri, 4 Dec 2020 15:07:57 +0000 (16:07 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Dec 2020 09:15:00 +0000 (10:15 +0100)
Explicitly state that if 'end == 1' the data doesn't represent actual
progress in most cases.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
src/libvirt-domain.c

index 5d3747fd398804f57d9fb43e3697405d9b66c8f4..5edc73ecada2cddbfad863c10401e981e0d55638 100644 (file)
@@ -9940,12 +9940,18 @@ virDomainBlockJobAbort(virDomainPtr dom, const char *disk,
  * can be found by calling virDomainGetXMLDesc() and inspecting
  * elements within //domain/devices/disk.
  *
- * As a corner case underlying hypervisor may report cur == 0 and
- * end == 0 when the block job hasn't been started yet. In this
- * case libvirt reports cur = 0 and end = 1. However, hypervisor
- * may return cur == 0 and end == 0 if the block job has finished
- * and was no-op. In this case libvirt reports cur = 1 and end = 1.
- * Since 2.3.0.
+ * In cases when libvirt can't determine actual progress of the block job from
+ * the underlying hypervisor due to corner cases such as the job wasn't yet
+ * fully initialized, or finalized and thus the progress can't be queried,
+ * libvirt reports 'cur = 0, end = 1'.
+ *
+ * For jobs requiring finalizing via qemuDomainBlockJobAbort() with
+ * VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT flag which reached synchronised phase, but
+ * were empty, or the progress can't be determined libvirt returns
+ * 'cur = 1, end = 1'.
+ *
+ * Users thus should not consider any data where 'end = 1' as absolute progress
+ * value.
  *
  * Applications looking for a reliable and low-overhead way to determine whether
  * a block job already finished or reached synchronised phase should register a