代码拉取完成,页面将自动刷新
同步操作将从 openEuler/qemu 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* Replication filter
*
* Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
* Copyright (c) 2016 Intel Corporation
* Copyright (c) 2016 FUJITSU LIMITED
*
* Author:
* Changlong Xie <[email protected]>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "block/replication.h"
static QLIST_HEAD(, ReplicationState) replication_states;
ReplicationState *replication_new(void *opaque, ReplicationOps *ops)
{
ReplicationState *rs;
assert(ops != NULL);
rs = g_new0(ReplicationState, 1);
rs->opaque = opaque;
rs->ops = ops;
QLIST_INSERT_HEAD(&replication_states, rs, node);
return rs;
}
void replication_remove(ReplicationState *rs)
{
if (rs) {
QLIST_REMOVE(rs, node);
g_free(rs);
}
}
/*
* The caller of the function MUST make sure vm stopped
*/
void replication_start_all(ReplicationMode mode, Error **errp)
{
ReplicationState *rs, *next;
Error *local_err = NULL;
QLIST_FOREACH_SAFE(rs, &replication_states, node, next) {
if (rs->ops && rs->ops->start) {
rs->ops->start(rs, mode, &local_err);
}
if (local_err) {
error_propagate(errp, local_err);
return;
}
}
}
void replication_do_checkpoint_all(Error **errp)
{
ReplicationState *rs, *next;
Error *local_err = NULL;
QLIST_FOREACH_SAFE(rs, &replication_states, node, next) {
if (rs->ops && rs->ops->checkpoint) {
rs->ops->checkpoint(rs, &local_err);
}
if (local_err) {
error_propagate(errp, local_err);
return;
}
}
}
void replication_get_error_all(Error **errp)
{
ReplicationState *rs, *next;
Error *local_err = NULL;
QLIST_FOREACH_SAFE(rs, &replication_states, node, next) {
if (rs->ops && rs->ops->get_error) {
rs->ops->get_error(rs, &local_err);
}
if (local_err) {
error_propagate(errp, local_err);
return;
}
}
}
void replication_stop_all(bool failover, Error **errp)
{
ReplicationState *rs, *next;
Error *local_err = NULL;
QLIST_FOREACH_SAFE(rs, &replication_states, node, next) {
if (rs->ops && rs->ops->stop) {
rs->ops->stop(rs, failover, &local_err);
}
if (local_err) {
error_propagate(errp, local_err);
return;
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。