From aef060850bd0e35aa7128e0ae3cef9d62c328314 Mon Sep 17 00:00:00 2001 From: zhanghailiang Date: Thu, 27 Oct 2016 14:43:04 +0800 Subject: COLO: Introduce state to record failover process When handling failover, COLO processes differently according to the different stage of failover process, here we introduce a global atomic variable to record the status of failover. We add four failover status to indicate the different stage of failover process. You should use the helpers to get and set the value. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Signed-off-by: Amit Shah --- include/migration/failover.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/migration/failover.h') diff --git a/include/migration/failover.h b/include/migration/failover.h index 3274735068..7e0f36a274 100644 --- a/include/migration/failover.h +++ b/include/migration/failover.h @@ -14,7 +14,12 @@ #define QEMU_FAILOVER_H #include "qemu-common.h" +#include "qapi-types.h" +void failover_init_state(void); +FailoverStatus failover_set_state(FailoverStatus old_state, + FailoverStatus new_state); +FailoverStatus failover_get_state(void); void failover_request_active(Error **errp); #endif -- cgit v1.2.3-55-g7522