Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
ab5be538
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看板
提交
ab5be538
编写于
5月 22, 2008
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Wire up free memory APIs to remote driver/daemon
上级
dd674689
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
228 addition
and
13 deletion
+228
-13
ChangeLog
ChangeLog
+13
-0
qemud/Makefile.am
qemud/Makefile.am
+3
-0
qemud/remote.c
qemud/remote.c
+47
-0
qemud/remote_dispatch_localvars.h
qemud/remote_dispatch_localvars.h
+3
-0
qemud/remote_dispatch_proc_switch.h
qemud/remote_dispatch_proc_switch.h
+15
-0
qemud/remote_dispatch_prototypes.h
qemud/remote_dispatch_prototypes.h
+2
-0
qemud/remote_generate_stubs.pl
qemud/remote_generate_stubs.pl
+10
-10
qemud/remote_protocol.c
qemud/remote_protocol.c
+30
-0
qemud/remote_protocol.h
qemud/remote_protocol.h
+28
-0
qemud/remote_protocol.x
qemud/remote_protocol.x
+20
-1
qemud/rpcgen_fix.pl
qemud/rpcgen_fix.pl
+3
-1
src/remote_internal.c
src/remote_internal.c
+54
-1
未找到文件。
ChangeLog
浏览文件 @
ab5be538
Thu May 22 11:15:29 EST 2008 Daniel P. Berrange <berrange@redhat.com>
Support the free memory API calls in the remote driver/daemon
* qemud/Makefile.am: Remove tabs from generated RPC header
* qemud/qemud/remote_generate_stubs.pl: Remove tabs from
generated C file
* qemud/remote_dispatch_*.h: Re-generated with for RPC calls
* qemud/remote_protocol.x: Added NUMA free memory apis
* qemud/remote_protocol.{c,h}: Re-generated with new RPC calls
* qemud/remote.c: Implement dispatcher for free memory APIs
* src/remote_internal.c: Implement functions for free
memory APIs
Thu May 22 11:06:29 EST 2008 Daniel P. Berrange <berrange@redhat.com>
Fix misc memory leaks
...
...
qemud/Makefile.am
浏览文件 @
ab5be538
...
...
@@ -26,6 +26,9 @@ endif
.x.h
:
rm
-f
$@
rpcgen
-h
-o
$@
$<
if
GLIBC_RPCGEN
perl
-i
-p
-e
's/\t/ /g'
$@
endif
endif
remote_protocol.c
:
remote_protocol.h
...
...
qemud/remote.c
浏览文件 @
ab5be538
...
...
@@ -595,6 +595,53 @@ remoteDispatchGetCapabilities (struct qemud_server *server ATTRIBUTE_UNUSED,
return
0
;
}
static
int
remoteDispatchNodeGetCellsFreeMemory
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
remote_node_get_cells_free_memory_args
*
args
,
remote_node_get_cells_free_memory_ret
*
ret
)
{
CHECK_CONN
(
client
);
if
(
args
->
maxCells
>
REMOTE_NODE_MAX_CELLS
)
{
remoteDispatchError
(
client
,
req
,
"%s"
,
_
(
"maxCells > REMOTE_NODE_MAX_CELLS"
));
return
-
2
;
}
/* Allocate return buffer. */
ret
->
freeMems
.
freeMems_val
=
calloc
(
args
->
maxCells
,
sizeof
(
*
(
ret
->
freeMems
.
freeMems_val
)));
ret
->
freeMems
.
freeMems_len
=
virNodeGetCellsFreeMemory
(
client
->
conn
,
(
unsigned
long
long
*
)
ret
->
freeMems
.
freeMems_val
,
args
->
startCell
,
args
->
maxCells
);
if
(
ret
->
freeMems
.
freeMems_len
==
0
)
return
-
1
;
return
0
;
}
static
int
remoteDispatchNodeGetFreeMemory
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
void
*
args
ATTRIBUTE_UNUSED
,
remote_node_get_free_memory_ret
*
ret
)
{
unsigned
long
long
freeMem
;
CHECK_CONN
(
client
);
freeMem
=
virNodeGetFreeMemory
(
client
->
conn
);
if
(
freeMem
==
0
)
return
-
1
;
ret
->
freeMem
=
freeMem
;
return
0
;
}
static
int
remoteDispatchDomainGetSchedulerType
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
,
...
...
qemud/remote_dispatch_localvars.h
浏览文件 @
ab5be538
...
...
@@ -98,6 +98,8 @@ remote_domain_save_args lv_remote_domain_save_args;
remote_domain_migrate_prepare_args
lv_remote_domain_migrate_prepare_args
;
remote_domain_migrate_prepare_ret
lv_remote_domain_migrate_prepare_ret
;
remote_domain_undefine_args
lv_remote_domain_undefine_args
;
remote_node_get_cells_free_memory_args
lv_remote_node_get_cells_free_memory_args
;
remote_node_get_cells_free_memory_ret
lv_remote_node_get_cells_free_memory_ret
;
remote_domain_get_scheduler_type_args
lv_remote_domain_get_scheduler_type_args
;
remote_domain_get_scheduler_type_ret
lv_remote_domain_get_scheduler_type_ret
;
remote_get_version_ret
lv_remote_get_version_ret
;
...
...
@@ -122,6 +124,7 @@ remote_storage_pool_undefine_args lv_remote_storage_pool_undefine_args;
remote_domain_set_autostart_args
lv_remote_domain_set_autostart_args
;
remote_storage_pool_get_autostart_args
lv_remote_storage_pool_get_autostart_args
;
remote_storage_pool_get_autostart_ret
lv_remote_storage_pool_get_autostart_ret
;
remote_node_get_free_memory_ret
lv_remote_node_get_free_memory_ret
;
remote_storage_vol_get_path_args
lv_remote_storage_vol_get_path_args
;
remote_storage_vol_get_path_ret
lv_remote_storage_vol_get_path_ret
;
remote_domain_lookup_by_id_args
lv_remote_domain_lookup_by_id_args
;
...
...
qemud/remote_dispatch_proc_switch.h
浏览文件 @
ab5be538
...
...
@@ -491,6 +491,21 @@ case REMOTE_PROC_NETWORK_UNDEFINE:
args
=
(
char
*
)
&
lv_remote_network_undefine_args
;
memset
(
&
lv_remote_network_undefine_args
,
0
,
sizeof
lv_remote_network_undefine_args
);
break
;
case
REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY
:
fn
=
(
dispatch_fn
)
remoteDispatchNodeGetCellsFreeMemory
;
args_filter
=
(
xdrproc_t
)
xdr_remote_node_get_cells_free_memory_args
;
args
=
(
char
*
)
&
lv_remote_node_get_cells_free_memory_args
;
memset
(
&
lv_remote_node_get_cells_free_memory_args
,
0
,
sizeof
lv_remote_node_get_cells_free_memory_args
);
ret_filter
=
(
xdrproc_t
)
xdr_remote_node_get_cells_free_memory_ret
;
ret
=
(
char
*
)
&
lv_remote_node_get_cells_free_memory_ret
;
memset
(
&
lv_remote_node_get_cells_free_memory_ret
,
0
,
sizeof
lv_remote_node_get_cells_free_memory_ret
);
break
;
case
REMOTE_PROC_NODE_GET_FREE_MEMORY
:
fn
=
(
dispatch_fn
)
remoteDispatchNodeGetFreeMemory
;
ret_filter
=
(
xdrproc_t
)
xdr_remote_node_get_free_memory_ret
;
ret
=
(
char
*
)
&
lv_remote_node_get_free_memory_ret
;
memset
(
&
lv_remote_node_get_free_memory_ret
,
0
,
sizeof
lv_remote_node_get_free_memory_ret
);
break
;
case
REMOTE_PROC_NODE_GET_INFO
:
fn
=
(
dispatch_fn
)
remoteDispatchNodeGetInfo
;
ret_filter
=
(
xdrproc_t
)
xdr_remote_node_get_info_ret
;
...
...
qemud/remote_dispatch_prototypes.h
浏览文件 @
ab5be538
...
...
@@ -67,6 +67,8 @@ static int remoteDispatchNetworkLookupByName (struct qemud_server *server, struc
static
int
remoteDispatchNetworkLookupByUuid
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
remote_network_lookup_by_uuid_args
*
args
,
remote_network_lookup_by_uuid_ret
*
ret
);
static
int
remoteDispatchNetworkSetAutostart
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
remote_network_set_autostart_args
*
args
,
void
*
ret
);
static
int
remoteDispatchNetworkUndefine
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
remote_network_undefine_args
*
args
,
void
*
ret
);
static
int
remoteDispatchNodeGetCellsFreeMemory
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
remote_node_get_cells_free_memory_args
*
args
,
remote_node_get_cells_free_memory_ret
*
ret
);
static
int
remoteDispatchNodeGetFreeMemory
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
void
*
args
,
remote_node_get_free_memory_ret
*
ret
);
static
int
remoteDispatchNodeGetInfo
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
void
*
args
,
remote_node_get_info_ret
*
ret
);
static
int
remoteDispatchNumOfDefinedDomains
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
void
*
args
,
remote_num_of_defined_domains_ret
*
ret
);
static
int
remoteDispatchNumOfDefinedNetworks
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
remote_message_header
*
req
,
void
*
args
,
remote_num_of_defined_networks_ret
*
ret
);
...
...
qemud/remote_generate_stubs.pl
浏览文件 @
ab5be538
...
...
@@ -84,8 +84,8 @@ if ($opt_d) {
my
@keys
=
sort
(
keys
%calls
);
foreach
(
@keys
)
{
print
"
$_
:
\n
";
print
"
\t
name
$calls
{
$_
}->{name} (
$calls
{
$_
}->{ProcName})
\n
";
print
"
\t
$calls
{
$_
}->{args} ->
$calls
{
$_
}->{ret}
\n
";
print
"
name
$calls
{
$_
}->{name} (
$calls
{
$_
}->{ProcName})
\n
";
print
"
$calls
{
$_
}->{args} ->
$calls
{
$_
}->{ret}
\n
";
}
}
...
...
@@ -117,18 +117,18 @@ elsif ($opt_w) {
my
@keys
=
sort
(
keys
%calls
);
foreach
(
@keys
)
{
print
"
case REMOTE_PROC_
$calls
{
$_
}->{UC_NAME}:
\n
";
print
"
\t
fn = (dispatch_fn) remoteDispatch
$calls
{
$_
}->{ProcName};
\n
";
print
"
fn = (dispatch_fn) remoteDispatch
$calls
{
$_
}->{ProcName};
\n
";
if
(
$calls
{
$_
}
->
{
args
}
ne
"
void
")
{
print
"
\t
args_filter = (xdrproc_t) xdr_
$calls
{
$_
}->{args};
\n
";
print
"
\t
args = (char *) &lv_
$calls
{
$_
}->{args};
\n
";
print
"
\t
memset (&lv_
$calls
{
$_
}->{args}, 0, sizeof lv_
$calls
{
$_
}->{args});
\n
"
print
"
args_filter = (xdrproc_t) xdr_
$calls
{
$_
}->{args};
\n
";
print
"
args = (char *) &lv_
$calls
{
$_
}->{args};
\n
";
print
"
memset (&lv_
$calls
{
$_
}->{args}, 0, sizeof lv_
$calls
{
$_
}->{args});
\n
"
}
if
(
$calls
{
$_
}
->
{
ret
}
ne
"
void
")
{
print
"
\t
ret_filter = (xdrproc_t) xdr_
$calls
{
$_
}->{ret};
\n
";
print
"
\t
ret = (char *) &lv_
$calls
{
$_
}->{ret};
\n
";
print
"
\t
memset (&lv_
$calls
{
$_
}->{ret}, 0, sizeof lv_
$calls
{
$_
}->{ret});
\n
"
print
"
ret_filter = (xdrproc_t) xdr_
$calls
{
$_
}->{ret};
\n
";
print
"
ret = (char *) &lv_
$calls
{
$_
}->{ret};
\n
";
print
"
memset (&lv_
$calls
{
$_
}->{ret}, 0, sizeof lv_
$calls
{
$_
}->{ret});
\n
"
}
print
"
\t
break;
\n
";
print
"
break;
\n
";
}
}
...
...
qemud/remote_protocol.c
浏览文件 @
ab5be538
...
...
@@ -386,6 +386,36 @@ xdr_remote_get_capabilities_ret (XDR *xdrs, remote_get_capabilities_ret *objp)
return
TRUE
;
}
bool_t
xdr_remote_node_get_cells_free_memory_args
(
XDR
*
xdrs
,
remote_node_get_cells_free_memory_args
*
objp
)
{
if
(
!
xdr_int
(
xdrs
,
&
objp
->
startCell
))
return
FALSE
;
if
(
!
xdr_int
(
xdrs
,
&
objp
->
maxCells
))
return
FALSE
;
return
TRUE
;
}
bool_t
xdr_remote_node_get_cells_free_memory_ret
(
XDR
*
xdrs
,
remote_node_get_cells_free_memory_ret
*
objp
)
{
if
(
!
xdr_array
(
xdrs
,
(
char
**
)
&
objp
->
freeMems
.
freeMems_val
,
(
u_int
*
)
&
objp
->
freeMems
.
freeMems_len
,
REMOTE_NODE_MAX_CELLS
,
sizeof
(
quad_t
),
(
xdrproc_t
)
xdr_quad_t
))
return
FALSE
;
return
TRUE
;
}
bool_t
xdr_remote_node_get_free_memory_ret
(
XDR
*
xdrs
,
remote_node_get_free_memory_ret
*
objp
)
{
if
(
!
xdr_quad_t
(
xdrs
,
&
objp
->
freeMem
))
return
FALSE
;
return
TRUE
;
}
bool_t
xdr_remote_domain_get_scheduler_type_args
(
XDR
*
xdrs
,
remote_domain_get_scheduler_type_args
*
objp
)
{
...
...
qemud/remote_protocol.h
浏览文件 @
ab5be538
...
...
@@ -30,6 +30,7 @@ typedef remote_nonnull_string *remote_string;
#define REMOTE_STORAGE_POOL_NAME_LIST_MAX 256
#define REMOTE_STORAGE_VOL_NAME_LIST_MAX 1024
#define REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX 16
#define REMOTE_NODE_MAX_CELLS 1024
#define REMOTE_AUTH_SASL_DATA_MAX 65536
#define REMOTE_AUTH_TYPE_LIST_MAX 20
...
...
@@ -176,6 +177,25 @@ struct remote_get_capabilities_ret {
};
typedef
struct
remote_get_capabilities_ret
remote_get_capabilities_ret
;
struct
remote_node_get_cells_free_memory_args
{
int
startCell
;
int
maxCells
;
};
typedef
struct
remote_node_get_cells_free_memory_args
remote_node_get_cells_free_memory_args
;
struct
remote_node_get_cells_free_memory_ret
{
struct
{
u_int
freeMems_len
;
quad_t
*
freeMems_val
;
}
freeMems
;
};
typedef
struct
remote_node_get_cells_free_memory_ret
remote_node_get_cells_free_memory_ret
;
struct
remote_node_get_free_memory_ret
{
quad_t
freeMem
;
};
typedef
struct
remote_node_get_free_memory_ret
remote_node_get_free_memory_ret
;
struct
remote_domain_get_scheduler_type_args
{
remote_nonnull_domain
dom
;
};
...
...
@@ -1116,6 +1136,8 @@ enum remote_procedure {
REMOTE_PROC_STORAGE_VOL_GET_INFO
=
98
,
REMOTE_PROC_STORAGE_VOL_DUMP_XML
=
99
,
REMOTE_PROC_STORAGE_VOL_GET_PATH
=
100
,
REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY
=
101
,
REMOTE_PROC_NODE_GET_FREE_MEMORY
=
102
,
};
typedef
enum
remote_procedure
remote_procedure
;
...
...
@@ -1172,6 +1194,9 @@ extern bool_t xdr_remote_get_max_vcpus_args (XDR *, remote_get_max_vcpus_args*)
extern
bool_t
xdr_remote_get_max_vcpus_ret
(
XDR
*
,
remote_get_max_vcpus_ret
*
);
extern
bool_t
xdr_remote_node_get_info_ret
(
XDR
*
,
remote_node_get_info_ret
*
);
extern
bool_t
xdr_remote_get_capabilities_ret
(
XDR
*
,
remote_get_capabilities_ret
*
);
extern
bool_t
xdr_remote_node_get_cells_free_memory_args
(
XDR
*
,
remote_node_get_cells_free_memory_args
*
);
extern
bool_t
xdr_remote_node_get_cells_free_memory_ret
(
XDR
*
,
remote_node_get_cells_free_memory_ret
*
);
extern
bool_t
xdr_remote_node_get_free_memory_ret
(
XDR
*
,
remote_node_get_free_memory_ret
*
);
extern
bool_t
xdr_remote_domain_get_scheduler_type_args
(
XDR
*
,
remote_domain_get_scheduler_type_args
*
);
extern
bool_t
xdr_remote_domain_get_scheduler_type_ret
(
XDR
*
,
remote_domain_get_scheduler_type_ret
*
);
extern
bool_t
xdr_remote_domain_get_scheduler_parameters_args
(
XDR
*
,
remote_domain_get_scheduler_parameters_args
*
);
...
...
@@ -1344,6 +1369,9 @@ extern bool_t xdr_remote_get_max_vcpus_args ();
extern
bool_t
xdr_remote_get_max_vcpus_ret
();
extern
bool_t
xdr_remote_node_get_info_ret
();
extern
bool_t
xdr_remote_get_capabilities_ret
();
extern
bool_t
xdr_remote_node_get_cells_free_memory_args
();
extern
bool_t
xdr_remote_node_get_cells_free_memory_ret
();
extern
bool_t
xdr_remote_node_get_free_memory_ret
();
extern
bool_t
xdr_remote_domain_get_scheduler_type_args
();
extern
bool_t
xdr_remote_domain_get_scheduler_type_ret
();
extern
bool_t
xdr_remote_domain_get_scheduler_parameters_args
();
...
...
qemud/remote_protocol.x
浏览文件 @
ab5be538
...
...
@@ -87,6 +87,9 @@ const REMOTE_STORAGE_VOL_NAME_LIST_MAX = 1024;
/* Upper limit on list of scheduler parameters. */
const
REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX
=
16
;
/* Upper limit on number of NUMA cells */
const
REMOTE_NODE_MAX_CELLS
=
1024
;
/* Upper limit on SASL auth negotiation packet */
const
REMOTE_AUTH_SASL_DATA_MAX
=
65536
;
...
...
@@ -254,6 +257,19 @@ struct remote_get_capabilities_ret {
remote_nonnull_string
capabilities
;
};
struct
remote_node_get_cells_free_memory_args
{
int
startCell
;
int
maxCells
;
};
struct
remote_node_get_cells_free_memory_ret
{
hyper
freeMems
<
REMOTE_NODE_MAX_CELLS
>
;
};
struct
remote_node_get_free_memory_ret
{
hyper
freeMem
;
};
struct
remote_domain_get_scheduler_type_args
{
remote_nonnull_domain
dom
;
};
...
...
@@ -1017,7 +1033,10 @@ enum remote_procedure {
REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH
=
97
,
REMOTE_PROC_STORAGE_VOL_GET_INFO
=
98
,
REMOTE_PROC_STORAGE_VOL_DUMP_XML
=
99
,
REMOTE_PROC_STORAGE_VOL_GET_PATH
=
100
REMOTE_PROC_STORAGE_VOL_GET_PATH
=
100
,
REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY
=
101
,
REMOTE_PROC_NODE_GET_FREE_MEMORY
=
102
};
/* Custom RPC structure. */
...
...
qemud/rpcgen_fix.pl
浏览文件 @
ab5be538
...
...
@@ -24,6 +24,8 @@ while (<>) {
next
;
}
s/\t/ /g
;
if
(
m/^}/
)
{
$in_function
=
0
;
...
...
@@ -52,7 +54,7 @@ while (<>) {
foreach
(
keys
%uses
)
{
$i
=
$uses
{
$_
};
unshift
@function
,
("
\t
char **objp_cpp
$i
= (char **) (void *) &
$_
;
\n
");
("
char **objp_cpp
$i
= (char **) (void *) &
$_
;
\n
");
$i
++
;
}
@function
=
...
...
src/remote_internal.c
浏览文件 @
ab5be538
...
...
@@ -1328,6 +1328,58 @@ remoteGetCapabilities (virConnectPtr conn)
return
ret
.
capabilities
;
}
static
int
remoteNodeGetCellsFreeMemory
(
virConnectPtr
conn
,
unsigned
long
long
*
freeMems
,
int
startCell
,
int
maxCells
)
{
remote_node_get_cells_free_memory_args
args
;
remote_node_get_cells_free_memory_ret
ret
;
int
i
;
GET_PRIVATE
(
conn
,
-
1
);
if
(
maxCells
>
REMOTE_NODE_MAX_CELLS
)
{
errorf
(
conn
,
VIR_ERR_RPC
,
_
(
"too many NUMA cells: %d > %d"
),
maxCells
,
REMOTE_NODE_MAX_CELLS
);
return
-
1
;
}
args
.
startCell
=
startCell
;
args
.
maxCells
=
maxCells
;
memset
(
&
ret
,
0
,
sizeof
ret
);
if
(
call
(
conn
,
priv
,
0
,
REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY
,
(
xdrproc_t
)
xdr_remote_node_get_cells_free_memory_args
,
(
char
*
)
&
args
,
(
xdrproc_t
)
xdr_remote_node_get_cells_free_memory_ret
,
(
char
*
)
&
ret
)
==
-
1
)
return
-
1
;
for
(
i
=
0
;
i
<
ret
.
freeMems
.
freeMems_len
;
i
++
)
freeMems
[
i
]
=
ret
.
freeMems
.
freeMems_val
[
i
];
xdr_free
((
xdrproc_t
)
xdr_remote_node_get_cells_free_memory_ret
,
(
char
*
)
&
ret
);
return
ret
.
freeMems
.
freeMems_len
;
}
static
unsigned
long
long
remoteNodeGetFreeMemory
(
virConnectPtr
conn
)
{
remote_node_get_free_memory_ret
ret
;
GET_PRIVATE
(
conn
,
-
1
);
memset
(
&
ret
,
0
,
sizeof
ret
);
if
(
call
(
conn
,
priv
,
0
,
REMOTE_PROC_NODE_GET_FREE_MEMORY
,
(
xdrproc_t
)
xdr_void
,
NULL
,
(
xdrproc_t
)
xdr_remote_node_get_free_memory_ret
,
(
char
*
)
&
ret
)
==
-
1
)
return
0
;
return
ret
.
freeMem
;
}
static
int
remoteListDomains
(
virConnectPtr
conn
,
int
*
ids
,
int
maxids
)
{
...
...
@@ -4732,7 +4784,8 @@ static virDriver driver = {
.
domainMigrateFinish
=
remoteDomainMigrateFinish
,
.
domainBlockStats
=
remoteDomainBlockStats
,
.
domainInterfaceStats
=
remoteDomainInterfaceStats
,
.
nodeGetCellsFreeMemory
=
NULL
,
.
nodeGetCellsFreeMemory
=
remoteNodeGetCellsFreeMemory
,
.
getFreeMemory
=
remoteNodeGetFreeMemory
,
};
static
virNetworkDriver
network_driver
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录