Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
lcr
提交
50b37ca8
L
lcr
项目概览
openeuler
/
lcr
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lcr
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
50b37ca8
编写于
3月 05, 2020
作者:
L
LiFeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lcr: fix invalid memory swappiness
Signed-off-by:
N
LiFeng
<
lifeng68@huawei.com
>
上级
b8cc45a5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
9 addition
and
9 deletion
+9
-9
src/conf.c
src/conf.c
+1
-1
src/json/schema/src/read_file.c
src/json/schema/src/read_file.c
+1
-1
src/json/schema/src/read_file.h
src/json/schema/src/read_file.h
+1
-1
src/lcrcontainer_execute.c
src/lcrcontainer_execute.c
+1
-1
src/log.c
src/log.c
+5
-5
tools/static_check
tools/static_check
+0
-0
未找到文件。
src/conf.c
浏览文件 @
50b37ca8
...
@@ -1279,7 +1279,7 @@ static int trans_resources_mem_swap(const oci_runtime_config_linux_resources *re
...
@@ -1279,7 +1279,7 @@ static int trans_resources_mem_swap(const oci_runtime_config_linux_resources *re
}
}
}
}
if
(
res
->
memory
->
swappiness
!=
INVALID_INT
)
{
if
(
res
->
memory
->
swappiness
!=
-
1
)
{
/* set swappiness parameter of vmscan */
/* set swappiness parameter of vmscan */
nret
=
trans_conf_uint64
(
conf
,
"lxc.cgroup.memory.swappiness"
,
res
->
memory
->
swappiness
);
nret
=
trans_conf_uint64
(
conf
,
"lxc.cgroup.memory.swappiness"
,
res
->
memory
->
swappiness
);
if
(
nret
<
0
)
{
if
(
nret
<
0
)
{
...
...
src/json/schema/src/read_file.c
浏览文件 @
50b37ca8
/*
/*
Copyright 2017 Giuseppe Scrivano
Copyright 2017 Giuseppe Scrivano
Copyright (C) Huawei Technologies., Ltd. 2018-2019. All rights reserved.
Copyright (C) Huawei Technologies., Ltd. 2018-2019. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
You may obtain a copy of the License at
...
...
src/json/schema/src/read_file.h
浏览文件 @
50b37ca8
/*
/*
Copyright 2017 Giuseppe Scrivano
Copyright 2017 Giuseppe Scrivano
Copyright (C) Huawei Technologies., Ltd. 2018-2019. All rights reserved.
Copyright (C) Huawei Technologies., Ltd. 2018-2019. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
You may obtain a copy of the License at
...
...
src/lcrcontainer_execute.c
浏览文件 @
50b37ca8
...
@@ -285,7 +285,7 @@ static bool update_resources_mem(struct lxc_container *c, struct lcr_cgroup_reso
...
@@ -285,7 +285,7 @@ static bool update_resources_mem(struct lxc_container *c, struct lcr_cgroup_reso
{
{
bool
ret
=
false
;
bool
ret
=
false
;
// If the memory update is set to -1 we should also set swap to -1, it means unlimited memory.
// If the memory update is set to -1 we should also set swap to -1, it means unlimited memory.
if
(
cr
->
memory_limit
==
-
1
)
{
if
(
cr
->
memory_limit
==
-
1
)
{
cr
->
memory_swap
=
-
1
;
cr
->
memory_swap
=
-
1
;
}
}
...
...
src/log.c
浏览文件 @
50b37ca8
...
@@ -65,10 +65,10 @@ void engine_free_log_prefix(void)
...
@@ -65,10 +65,10 @@ void engine_free_log_prefix(void)
static
ssize_t
write_nointr
(
int
fd
,
const
void
*
buf
,
size_t
count
);
static
ssize_t
write_nointr
(
int
fd
,
const
void
*
buf
,
size_t
count
);
static
void
do_fifo_log
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
timestamp
,
static
void
do_fifo_log
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
timestamp
,
const
char
*
msg
);
const
char
*
msg
);
static
void
do_stderr_log
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
timestamp
,
static
void
do_stderr_log
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
timestamp
,
const
char
*
msg
);
const
char
*
msg
);
/* engine change str logdriver to enum */
/* engine change str logdriver to enum */
static
int
engine_change_str_logdriver_to_enum
(
const
char
*
driver
)
static
int
engine_change_str_logdriver_to_enum
(
const
char
*
driver
)
...
@@ -212,7 +212,7 @@ out:
...
@@ -212,7 +212,7 @@ out:
}
}
static
int
do_log_by_driver
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
msg
,
static
int
do_log_by_driver
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
msg
,
const
char
*
date_time
)
const
char
*
date_time
)
{
{
switch
(
g_engine_log_driver
)
{
switch
(
g_engine_log_driver
)
{
case
LOG_DRIVER_STDOUT
:
case
LOG_DRIVER_STDOUT
:
...
@@ -314,7 +314,7 @@ static void do_write_log_into_file(int log_fd, char *log_msg, size_t max_len, si
...
@@ -314,7 +314,7 @@ static void do_write_log_into_file(int log_fd, char *log_msg, size_t max_len, si
/* log append logfile */
/* log append logfile */
static
void
do_fifo_log
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
timestamp
,
static
void
do_fifo_log
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
timestamp
,
const
char
*
msg
)
const
char
*
msg
)
{
{
char
log_buffer
[
ENGINE_LOG_BUFFER_SIZE
]
=
{
0
};
char
log_buffer
[
ENGINE_LOG_BUFFER_SIZE
]
=
{
0
};
int
log_fd
=
-
1
;
int
log_fd
=
-
1
;
...
@@ -353,7 +353,7 @@ static void do_fifo_log(const struct engine_log_object_metadata *metadata, const
...
@@ -353,7 +353,7 @@ static void do_fifo_log(const struct engine_log_object_metadata *metadata, const
/* log append stderr */
/* log append stderr */
static
void
do_stderr_log
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
timestamp
,
static
void
do_stderr_log
(
const
struct
engine_log_object_metadata
*
metadata
,
const
char
*
timestamp
,
const
char
*
msg
)
const
char
*
msg
)
{
{
char
*
tmp_prefix
=
NULL
;
char
*
tmp_prefix
=
NULL
;
if
(
metadata
->
level
>
g_engine_log_level
)
{
if
(
metadata
->
level
>
g_engine_log_level
)
{
...
...
tools/static_check
100644 → 100755
浏览文件 @
50b37ca8
文件模式从 100644 更改为 100755
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录