Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
854a004f
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,发现更多精彩内容 >>
提交
854a004f
编写于
4月 03, 2013
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add misc extra debugging into cgroups code
Signed-off-by:
N
Daniel P. Berrange
<
berrange@redhat.com
>
上级
8d1c141a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
2 deletion
+14
-2
src/util/vircgroup.c
src/util/vircgroup.c
+14
-2
未找到文件。
src/util/vircgroup.c
浏览文件 @
854a004f
...
@@ -663,12 +663,18 @@ static int virCgroupMakeGroup(virCgroupPtr parent,
...
@@ -663,12 +663,18 @@ static int virCgroupMakeGroup(virCgroupPtr parent,
char
*
path
=
NULL
;
char
*
path
=
NULL
;
/* Skip over controllers that aren't mounted */
/* Skip over controllers that aren't mounted */
if
(
!
group
->
controllers
[
i
].
mountPoint
)
if
(
!
group
->
controllers
[
i
].
mountPoint
)
{
VIR_DEBUG
(
"Skipping unmounted controller %s"
,
virCgroupControllerTypeToString
(
i
));
continue
;
continue
;
}
rc
=
virCgroupPathOfController
(
group
,
i
,
""
,
&
path
);
rc
=
virCgroupPathOfController
(
group
,
i
,
""
,
&
path
);
if
(
rc
<
0
)
if
(
rc
<
0
)
{
VIR_DEBUG
(
"Failed to find path of controller %s"
,
virCgroupControllerTypeToString
(
i
));
return
rc
;
return
rc
;
}
/* As of Feb 2011, clang can't see that the above function
/* As of Feb 2011, clang can't see that the above function
* call did not modify group. */
* call did not modify group. */
sa_assert
(
group
->
controllers
[
i
].
mountPoint
);
sa_assert
(
group
->
controllers
[
i
].
mountPoint
);
...
@@ -682,11 +688,14 @@ static int virCgroupMakeGroup(virCgroupPtr parent,
...
@@ -682,11 +688,14 @@ static int virCgroupMakeGroup(virCgroupPtr parent,
* other controllers even though they are available. So
* other controllers even though they are available. So
* treat blkio as unmounted if mkdir fails. */
* treat blkio as unmounted if mkdir fails. */
if
(
i
==
VIR_CGROUP_CONTROLLER_BLKIO
)
{
if
(
i
==
VIR_CGROUP_CONTROLLER_BLKIO
)
{
VIR_DEBUG
(
"Ignoring mkdir failure with blkio controller. Kernel probably too old"
);
rc
=
0
;
rc
=
0
;
VIR_FREE
(
group
->
controllers
[
i
].
mountPoint
);
VIR_FREE
(
group
->
controllers
[
i
].
mountPoint
);
VIR_FREE
(
path
);
VIR_FREE
(
path
);
continue
;
continue
;
}
else
{
}
else
{
VIR_DEBUG
(
"Failed to create controller %s for group"
,
virCgroupControllerTypeToString
(
i
));
rc
=
-
errno
;
rc
=
-
errno
;
VIR_FREE
(
path
);
VIR_FREE
(
path
);
break
;
break
;
...
@@ -720,6 +729,7 @@ static int virCgroupMakeGroup(virCgroupPtr parent,
...
@@ -720,6 +729,7 @@ static int virCgroupMakeGroup(virCgroupPtr parent,
VIR_FREE
(
path
);
VIR_FREE
(
path
);
}
}
VIR_DEBUG
(
"Done making controllers for group"
);
return
rc
;
return
rc
;
}
}
...
@@ -904,6 +914,7 @@ int virCgroupRemove(virCgroupPtr group)
...
@@ -904,6 +914,7 @@ int virCgroupRemove(virCgroupPtr group)
int
i
;
int
i
;
char
*
grppath
=
NULL
;
char
*
grppath
=
NULL
;
VIR_DEBUG
(
"Removing cgroup %s"
,
group
->
path
);
for
(
i
=
0
;
i
<
VIR_CGROUP_CONTROLLER_LAST
;
i
++
)
{
for
(
i
=
0
;
i
<
VIR_CGROUP_CONTROLLER_LAST
;
i
++
)
{
/* Skip over controllers not mounted */
/* Skip over controllers not mounted */
if
(
!
group
->
controllers
[
i
].
mountPoint
)
if
(
!
group
->
controllers
[
i
].
mountPoint
)
...
@@ -919,6 +930,7 @@ int virCgroupRemove(virCgroupPtr group)
...
@@ -919,6 +930,7 @@ int virCgroupRemove(virCgroupPtr group)
rc
=
virCgroupRemoveRecursively
(
grppath
);
rc
=
virCgroupRemoveRecursively
(
grppath
);
VIR_FREE
(
grppath
);
VIR_FREE
(
grppath
);
}
}
VIR_DEBUG
(
"Done removing cgroup %s"
,
group
->
path
);
return
rc
;
return
rc
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录