lcr/0001-fix-update-cpu-rt-period-failed.patch
zhangxiaoyu a291c48708 fix update cpu-rt period failed and fix layer size type as int64
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
(cherry picked from commit f8cec86372b80b97a807a74ca1314651e2cdf2df)
2023-02-21 16:31:13 +08:00

38 lines
1016 B
Diff

From 42cf57e75e50457c1a4ee28d286aa4644c9c266a Mon Sep 17 00:00:00 2001
From: songbuhuang <544824346@qq.com>
Date: Wed, 8 Feb 2023 10:40:20 +0800
Subject: [PATCH 1/2] fix update cpu-rt period failed
Signed-off-by: songbuhuang <544824346@qq.com>
---
src/lcrcontainer_execute.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/lcrcontainer_execute.c b/src/lcrcontainer_execute.c
index ac49c50..4c49a28 100644
--- a/src/lcrcontainer_execute.c
+++ b/src/lcrcontainer_execute.c
@@ -363,14 +363,15 @@ static bool update_resources_cpu_v1(struct lxc_container *c, const struct lcr_cg
if (!update_resources_cpuset_mems(c, cr)) {
goto err_out;
}
-
- if (update_resources_cpu_rt_period(c, cr) != 0) {
- goto err_out;
- }
+
if (update_resources_cpu_rt_runtime(c, cr) != 0) {
goto err_out;
}
+ if (update_resources_cpu_rt_period(c, cr) != 0) {
+ goto err_out;
+ }
+
ret = true;
err_out:
return ret;
--
2.25.1