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 <zhang.zhanghailiang@huawei.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit@amitshah.net>
26 lines
752 B
C
26 lines
752 B
C
/*
|
|
* COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
|
|
* (a.k.a. Fault Tolerance or Continuous Replication)
|
|
*
|
|
* Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD.
|
|
* Copyright (c) 2016 FUJITSU LIMITED
|
|
* Copyright (c) 2016 Intel Corporation
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or
|
|
* later. See the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#ifndef QEMU_FAILOVER_H
|
|
#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
|