From 2a2f26d321b22b06102ee6d2f2bf07f087e64a49 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 25 Nov 2019 17:19:48 +0100 Subject: [PATCH] API: Introduce field for reporting temporary disk space usage of a domain job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A pull mode backup job uses temporary disk images to hold the changed parts of the disk while the client is copying the changes. Since usage of the temporary space can be monitored but doesn't really fit any of the existing stats fields introduce new fields for reporting this data. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrangé Reviewed-by: Ján Tomko --- include/libvirt/libvirt-domain.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index a099b3d891..949476a497 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -3600,6 +3600,20 @@ typedef enum { */ # define VIR_DOMAIN_JOB_SUCCESS "success" +/** + * VIR_DOMAIN_JOB_DISK_TEMP_USED: + * virDomainGetJobStats field: current usage of temporary disk space for the + * job in bytes as VIR_TYPED_PARAM_ULLONG. + */ +# define VIR_DOMAIN_JOB_DISK_TEMP_USED "disk_temp_used" + +/** + * VIR_DOMAIN_JOB_DISK_TEMP_TOTAL: + * virDomainGetJobStats field: possible total temporary disk space for the + * job in bytes as VIR_TYPED_PARAM_ULLONG. + */ +# define VIR_DOMAIN_JOB_DISK_TEMP_TOTAL "disk_temp_total" + /** * virConnectDomainEventGenericCallback: * @conn: the connection pointer -- GitLab