computing-offload/generic_vdpa/libvirt/migration-dirtyrate-Introduce-virDomainDirtyRateStat.patch
jiangdongxu 79c4324644 add generic_vdpa basecode
Change-Id: I2d302dda68298877c65c99147f5bf22186a59aac
2024-09-19 17:19:46 +08:00

53 lines
1.8 KiB
Diff

From 752ee833cda682db3cb0a38b094f3a2ec1317486 Mon Sep 17 00:00:00 2001
From: Hao Wang <wanghao232@huawei.com>
Date: Tue, 16 Mar 2021 20:32:48 +0800
Subject: [PATCH 4/7] migration/dirtyrate: Introduce virDomainDirtyRateStatus
enum
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Introduce virDomainDirtyRateStatus enum.
cherry-pick from a0c7f61f37c087dcc1fadfba9f5308b0bcb5784a
Signed-off-by: Hao Wang <wanghao232@huawei.com>
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
include/libvirt/libvirt-domain.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 24df273045..01dc64f4f4 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -5011,6 +5011,24 @@ virDomainHotpatchManage(virDomainPtr domain,
const char *id,
unsigned int flags);
+/**
+ * virDomainDirtyRateStatus:
+ *
+ * Details on the cause of a dirty rate calculation status.
+ */
+typedef enum {
+ VIR_DOMAIN_DIRTYRATE_UNSTARTED = 0, /* the dirtyrate calculation has
+ not been started */
+ VIR_DOMAIN_DIRTYRATE_MEASURING = 1, /* the dirtyrate calculation is
+ measuring */
+ VIR_DOMAIN_DIRTYRATE_MEASURED = 2, /* the dirtyrate calculation is
+ completed */
+
+# ifdef VIR_ENUM_SENTINELS
+ VIR_DOMAIN_DIRTYRATE_LAST
+# endif
+} virDomainDirtyRateStatus;
+
int virDomainStartDirtyRateCalc(virDomainPtr domain,
int seconds,
unsigned int flags);
--
2.27.0