2024-02-23 17:24:26 +01:00
|
|
|
From ae7d09f074e554a241ba66a2dee2a0cb4b3a0162 Mon Sep 17 00:00:00 2001
|
2024-01-23 14:52:53 +01:00
|
|
|
From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com>
|
2024-02-23 17:24:26 +01:00
|
|
|
Date: Mon, 22 Jan 2024 16:58:18 +0100
|
|
|
|
Subject: [PATCH 5010/5010] cgroup: Rename effective limits internal table
|
2024-01-23 14:52:53 +01:00
|
|
|
|
|
|
|
Post-merge fixup of commit 4fb0d2dc14 ("cgroup: Add EffectiveMemoryMax=,
|
|
|
|
EffectiveMemoryHigh= and EffectiveTasksMax= properties"), no functional
|
|
|
|
change intended.
|
|
|
|
|
|
|
|
(cherry picked from commit 8ad614890bba66b5f6b590d6a3e1b8b04a920126)
|
|
|
|
|
|
|
|
[mkoutny: fixes jsc#PED-5659]
|
|
|
|
---
|
|
|
|
src/core/cgroup.c | 4 ++--
|
|
|
|
src/core/cgroup.h | 4 ++--
|
|
|
|
src/core/dbus-unit.c | 2 +-
|
|
|
|
3 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
|
2024-02-23 17:24:26 +01:00
|
|
|
index 285fa200d6..0c30aefe80 100644
|
2024-01-23 14:52:53 +01:00
|
|
|
--- a/src/core/cgroup.c
|
|
|
|
+++ b/src/core/cgroup.c
|
2024-02-23 17:24:26 +01:00
|
|
|
@@ -4715,10 +4715,10 @@ static const char* const cgroup_memory_accounting_metric_table[_CGROUP_MEMORY_AC
|
2024-01-23 14:52:53 +01:00
|
|
|
|
2024-02-23 17:24:26 +01:00
|
|
|
DEFINE_STRING_TABLE_LOOKUP(cgroup_memory_accounting_metric, CGroupMemoryAccountingMetric);
|
2024-01-23 14:52:53 +01:00
|
|
|
|
|
|
|
-static const char *const cgroup_limit_type_table[_CGROUP_LIMIT_TYPE_MAX] = {
|
|
|
|
+static const char *const cgroup_effective_limit_type_table[_CGROUP_LIMIT_TYPE_MAX] = {
|
|
|
|
[CGROUP_LIMIT_MEMORY_MAX] = "EffectiveMemoryMax",
|
|
|
|
[CGROUP_LIMIT_MEMORY_HIGH] = "EffectiveMemoryHigh",
|
|
|
|
[CGROUP_LIMIT_TASKS_MAX] = "EffectiveTasksMax",
|
|
|
|
};
|
|
|
|
|
|
|
|
-DEFINE_STRING_TABLE_LOOKUP(cgroup_limit_type, CGroupLimitType);
|
|
|
|
+DEFINE_STRING_TABLE_LOOKUP(cgroup_effective_limit_type, CGroupLimitType);
|
|
|
|
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
|
2024-02-23 17:24:26 +01:00
|
|
|
index 54bce91ea1..6e3d05b7d2 100644
|
2024-01-23 14:52:53 +01:00
|
|
|
--- a/src/core/cgroup.h
|
|
|
|
+++ b/src/core/cgroup.h
|
2024-02-23 17:24:26 +01:00
|
|
|
@@ -435,8 +435,8 @@ CGroupIPAccountingMetric cgroup_ip_accounting_metric_from_string(const char *s)
|
|
|
|
const char* cgroup_io_accounting_metric_to_string(CGroupIOAccountingMetric m) _const_;
|
|
|
|
CGroupIOAccountingMetric cgroup_io_accounting_metric_from_string(const char *s) _pure_;
|
2024-01-23 14:52:53 +01:00
|
|
|
|
|
|
|
-const char* cgroup_limit_type_to_string(CGroupLimitType m) _const_;
|
|
|
|
-CGroupLimitType cgroup_limit_type_from_string(const char *s) _pure_;
|
|
|
|
+const char* cgroup_effective_limit_type_to_string(CGroupLimitType m) _const_;
|
|
|
|
+CGroupLimitType cgroup_effective_limit_type_from_string(const char *s) _pure_;
|
2024-02-23 17:24:26 +01:00
|
|
|
|
|
|
|
const char* cgroup_memory_accounting_metric_to_string(CGroupMemoryAccountingMetric m) _const_;
|
|
|
|
CGroupMemoryAccountingMetric cgroup_memory_accounting_metric_from_string(const char *s) _pure_;
|
2024-01-23 14:52:53 +01:00
|
|
|
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
|
2024-02-23 17:24:26 +01:00
|
|
|
index ac6add4700..bb19831814 100644
|
2024-01-23 14:52:53 +01:00
|
|
|
--- a/src/core/dbus-unit.c
|
|
|
|
+++ b/src/core/dbus-unit.c
|
2024-02-23 17:24:26 +01:00
|
|
|
@@ -1458,7 +1458,7 @@ static int property_get_effective_limit(
|
2024-01-23 14:52:53 +01:00
|
|
|
assert(reply);
|
|
|
|
assert(property);
|
|
|
|
|
|
|
|
- assert_se((type = cgroup_limit_type_from_string(property)) >= 0);
|
|
|
|
+ assert_se((type = cgroup_effective_limit_type_from_string(property)) >= 0);
|
|
|
|
(void) unit_get_effective_limit(u, type, &value);
|
|
|
|
return sd_bus_message_append(reply, "t", value);
|
|
|
|
}
|
|
|
|
--
|
|
|
|
2.35.3
|
|
|
|
|