Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
bb9f1bbf
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,发现更多精彩内容 >>
提交
bb9f1bbf
编写于
5月 17, 2011
作者:
H
Hu Tao
提交者:
Eric Blake
5月 17, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remote: introduce remoteSetSchedulerParametersFlags
support for virDomainSetSchedulerParametersFlags of remote driver.
上级
a9189e2c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
156 addition
and
1 deletion
+156
-1
daemon/remote.c
daemon/remote.c
+71
-0
src/remote/remote_driver.c
src/remote/remote_driver.c
+69
-0
src/remote/remote_protocol.x
src/remote/remote_protocol.x
+8
-1
src/remote_protocol-structs
src/remote_protocol-structs
+8
-0
未找到文件。
daemon/remote.c
浏览文件 @
bb9f1bbf
...
@@ -687,6 +687,77 @@ cleanup:
...
@@ -687,6 +687,77 @@ cleanup:
return
rv
;
return
rv
;
}
}
static
int
remoteDispatchDomainSetSchedulerParametersFlags
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
virConnectPtr
conn
,
remote_message_header
*
hdr
ATTRIBUTE_UNUSED
,
remote_error
*
rerr
,
remote_domain_set_scheduler_parameters_flags_args
*
args
,
void
*
ret
ATTRIBUTE_UNUSED
)
{
virDomainPtr
dom
=
NULL
;
virSchedParameterPtr
params
=
NULL
;
int
i
,
nparams
;
int
rv
=
-
1
;
if
(
!
conn
)
{
virNetError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"connection not open"
));
goto
cleanup
;
}
nparams
=
args
->
params
.
params_len
;
if
(
nparams
>
REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX
)
{
virNetError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"nparams too large"
));
goto
cleanup
;
}
if
(
VIR_ALLOC_N
(
params
,
nparams
)
<
0
)
{
virReportOOMError
();
goto
cleanup
;
}
/* Deserialise parameters. */
for
(
i
=
0
;
i
<
nparams
;
++
i
)
{
if
(
virStrcpyStatic
(
params
[
i
].
field
,
args
->
params
.
params_val
[
i
].
field
)
==
NULL
)
{
virNetError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Field %s too big for destination"
),
args
->
params
.
params_val
[
i
].
field
);
goto
cleanup
;
}
params
[
i
].
type
=
args
->
params
.
params_val
[
i
].
value
.
type
;
switch
(
params
[
i
].
type
)
{
case
VIR_DOMAIN_SCHED_FIELD_INT
:
params
[
i
].
value
.
i
=
args
->
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
i
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_UINT
:
params
[
i
].
value
.
ui
=
args
->
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
ui
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_LLONG
:
params
[
i
].
value
.
l
=
args
->
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
l
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_ULLONG
:
params
[
i
].
value
.
ul
=
args
->
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
ul
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_DOUBLE
:
params
[
i
].
value
.
d
=
args
->
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
d
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_BOOLEAN
:
params
[
i
].
value
.
b
=
args
->
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
b
;
break
;
}
}
if
(
!
(
dom
=
get_nonnull_domain
(
conn
,
args
->
dom
)))
goto
cleanup
;
if
(
virDomainSetSchedulerParametersFlags
(
dom
,
params
,
nparams
,
args
->
flags
)
<
0
)
goto
cleanup
;
rv
=
0
;
cleanup:
if
(
rv
<
0
)
remoteDispatchError
(
rerr
);
if
(
dom
)
virDomainFree
(
dom
);
VIR_FREE
(
params
);
return
rv
;
}
static
int
static
int
remoteDispatchDomainMemoryStats
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
remoteDispatchDomainMemoryStats
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
...
...
src/remote/remote_driver.c
浏览文件 @
bb9f1bbf
...
@@ -2636,6 +2636,74 @@ done:
...
@@ -2636,6 +2636,74 @@ done:
return
rv
;
return
rv
;
}
}
static
int
remoteDomainSetSchedulerParametersFlags
(
virDomainPtr
domain
,
virSchedParameterPtr
params
,
int
nparams
,
unsigned
int
flags
)
{
int
rv
=
-
1
;
remote_domain_set_scheduler_parameters_flags_args
args
;
int
i
,
do_error
;
struct
private_data
*
priv
=
domain
->
conn
->
privateData
;
remoteDriverLock
(
priv
);
make_nonnull_domain
(
&
args
.
dom
,
domain
);
/* Serialise the scheduler parameters. */
args
.
params
.
params_len
=
nparams
;
args
.
flags
=
flags
;
if
(
VIR_ALLOC_N
(
args
.
params
.
params_val
,
nparams
)
<
0
)
{
virReportOOMError
();
goto
done
;
}
do_error
=
0
;
for
(
i
=
0
;
i
<
nparams
;
++
i
)
{
/* call() will free this: */
args
.
params
.
params_val
[
i
].
field
=
strdup
(
params
[
i
].
field
);
if
(
args
.
params
.
params_val
[
i
].
field
==
NULL
)
{
virReportOOMError
();
do_error
=
1
;
}
args
.
params
.
params_val
[
i
].
value
.
type
=
params
[
i
].
type
;
switch
(
params
[
i
].
type
)
{
case
VIR_DOMAIN_SCHED_FIELD_INT
:
args
.
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
i
=
params
[
i
].
value
.
i
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_UINT
:
args
.
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
ui
=
params
[
i
].
value
.
ui
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_LLONG
:
args
.
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
l
=
params
[
i
].
value
.
l
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_ULLONG
:
args
.
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
ul
=
params
[
i
].
value
.
ul
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_DOUBLE
:
args
.
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
d
=
params
[
i
].
value
.
d
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_BOOLEAN
:
args
.
params
.
params_val
[
i
].
value
.
remote_sched_param_value_u
.
b
=
params
[
i
].
value
.
b
;
break
;
default:
remoteError
(
VIR_ERR_RPC
,
"%s"
,
_
(
"unknown parameter type"
));
do_error
=
1
;
}
}
if
(
do_error
)
{
xdr_free
((
xdrproc_t
)
xdr_remote_domain_set_scheduler_parameters_flags_args
,
(
char
*
)
&
args
);
goto
done
;
}
if
(
call
(
domain
->
conn
,
priv
,
0
,
REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS
,
(
xdrproc_t
)
xdr_remote_domain_set_scheduler_parameters_flags_args
,
(
char
*
)
&
args
,
(
xdrproc_t
)
xdr_void
,
(
char
*
)
NULL
)
==
-
1
)
goto
done
;
rv
=
0
;
done:
remoteDriverUnlock
(
priv
);
return
rv
;
}
static
int
static
int
remoteDomainMemoryStats
(
virDomainPtr
domain
,
remoteDomainMemoryStats
(
virDomainPtr
domain
,
struct
_virDomainMemoryStat
*
stats
,
struct
_virDomainMemoryStat
*
stats
,
...
@@ -6799,6 +6867,7 @@ static virDriver remote_driver = {
...
@@ -6799,6 +6867,7 @@ static virDriver remote_driver = {
.
domainMigratePerform3
=
remoteDomainMigratePerform3
,
/* 0.9.2 */
.
domainMigratePerform3
=
remoteDomainMigratePerform3
,
/* 0.9.2 */
.
domainMigrateFinish3
=
remoteDomainMigrateFinish3
,
/* 0.9.2 */
.
domainMigrateFinish3
=
remoteDomainMigrateFinish3
,
/* 0.9.2 */
.
domainMigrateConfirm3
=
remoteDomainMigrateConfirm3
,
/* 0.9.2 */
.
domainMigrateConfirm3
=
remoteDomainMigrateConfirm3
,
/* 0.9.2 */
.
domainSetSchedulerParametersFlags
=
remoteDomainSetSchedulerParametersFlags
,
/* 0.9.2 */
};
};
static
virNetworkDriver
network_driver
=
{
static
virNetworkDriver
network_driver
=
{
...
...
src/remote/remote_protocol.x
浏览文件 @
bb9f1bbf
...
@@ -476,6 +476,12 @@ struct remote_domain_set_scheduler_parameters_args {
...
@@ -476,6 +476,12 @@ struct remote_domain_set_scheduler_parameters_args {
remote_sched_param
params
<
REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX
>
;
remote_sched_param
params
<
REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX
>
;
};
};
struct
remote_domain_set_scheduler_parameters_flags_args
{
remote_nonnull_domain
dom
;
remote_sched_param
params
<
REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX
>
;
unsigned
int
flags
;
};
struct
remote_domain_set_blkio_parameters_args
{
struct
remote_domain_set_blkio_parameters_args
{
remote_nonnull_domain
dom
;
remote_nonnull_domain
dom
;
remote_blkio_param
params
<
REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX
>
;
remote_blkio_param
params
<
REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX
>
;
...
@@ -2284,7 +2290,8 @@ enum remote_procedure {
...
@@ -2284,7 +2290,8 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3
=
215
,
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3
=
215
,
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3
=
216
,
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3
=
216
,
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_FINISH3
=
217
,
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_FINISH3
=
217
,
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3
=
218
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3
=
218
,
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS
=
219
/* skipgen skipgen */
/*
/*
* Notice how the entries are grouped in sets of 10 ?
* Notice how the entries are grouped in sets of 10 ?
...
...
src/remote_protocol-structs
浏览文件 @
bb9f1bbf
...
@@ -188,6 +188,14 @@ struct remote_domain_set_scheduler_parameters_args {
...
@@ -188,6 +188,14 @@ struct remote_domain_set_scheduler_parameters_args {
remote_sched_param
*
params_val
;
remote_sched_param
*
params_val
;
}
params
;
}
params
;
};
};
struct
remote_domain_set_scheduler_parameters_flags_args
{
remote_nonnull_domain
dom
;
struct
{
u_int
params_len
;
remote_sched_param
*
params_val
;
}
params
;
u_int
flags
;
};
struct
remote_domain_set_blkio_parameters_args
{
struct
remote_domain_set_blkio_parameters_args
{
remote_nonnull_domain
dom
;
remote_nonnull_domain
dom
;
struct
{
struct
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录