Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
68f63673
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
68f63673
编写于
3月 12, 2010
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Public virDomainMigrateSetMaxDowntime API
上级
7f7849c9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
54 addition
and
0 deletion
+54
-0
include/libvirt/libvirt.h.in
include/libvirt/libvirt.h.in
+4
-0
src/libvirt.c
src/libvirt.c
+49
-0
src/libvirt_public.syms
src/libvirt_public.syms
+1
-0
未找到文件。
include/libvirt/libvirt.h.in
浏览文件 @
68f63673
...
...
@@ -408,6 +408,10 @@ int virDomainMigrateToURI (virDomainPtr domain, const char *duri,
unsigned
long
flags
,
const
char
*
dname
,
unsigned
long
bandwidth
);
int
virDomainMigrateSetMaxDowntime
(
virDomainPtr
domain
,
unsigned
long
long
downtime
,
unsigned
int
flags
);
/**
* VIR_NODEINFO_MAXCPUS:
* @nodeinfo: virNodeInfo instance
...
...
src/libvirt.c
浏览文件 @
68f63673
...
...
@@ -11312,3 +11312,52 @@ error:
virDispatchError
(
conn
);
return
-
1
;
}
/**
* virDomainMigrateSetMaxDowntime:
* @domain: a domain object
* @downtime: maximum tolerable downtime for live migration, in milliseconds
* @flags: fine-tuning flags, currently unused, use 0
*
* Sets maximum tolerable time for which the domain is allowed to be paused
* at the end of live migration. It's supposed to be called while the domain is
* being live-migrated as a reaction to migration progress.
*
* Returns 0 in case of success, -1 otherwise.
*/
int
virDomainMigrateSetMaxDowntime
(
virDomainPtr
domain
,
unsigned
long
long
downtime
,
unsigned
int
flags
)
{
virConnectPtr
conn
;
DEBUG
(
"domain=%p, downtime=%llu, flags=%u"
,
domain
,
downtime
,
flags
);
virResetLastError
();
if
(
!
VIR_IS_CONNECTED_DOMAIN
(
domain
))
{
virLibDomainError
(
NULL
,
VIR_ERR_INVALID_DOMAIN
,
__FUNCTION__
);
virDispatchError
(
NULL
);
return
-
1
;
}
conn
=
domain
->
conn
;
if
(
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibDomainError
(
domain
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
goto
error
;
}
if
(
conn
->
driver
->
domainMigrateSetMaxDowntime
)
{
if
(
conn
->
driver
->
domainMigrateSetMaxDowntime
(
domain
,
downtime
,
flags
)
<
0
)
goto
error
;
return
0
;
}
virLibConnError
(
conn
,
VIR_ERR_NO_SUPPORT
,
__FUNCTION__
);
error:
virDispatchError
(
conn
);
return
-
1
;
}
src/libvirt_public.syms
浏览文件 @
68f63673
...
...
@@ -361,6 +361,7 @@ LIBVIRT_0.7.7 {
LIBVIRT_0.7.8 {
global:
virStorageVolWipe;
virDomainMigrateSetMaxDowntime;
} LIBVIRT_0.7.7;
# .... define new API here using predicted next version number ....
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录