diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-24 17:30:46 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-10-26 18:43:34 +0200 |
commit | 4edd65e4cff40158dded65c010b8c3e0b5ff5519 (patch) | |
tree | e598fa234d331de10ae8b846f670a4d74b2d9089 /src/basic | |
parent | cgroup-util: disable buffering for cg_enable_everywhere() when writing to cgr... (diff) | |
download | systemd-4edd65e4cff40158dded65c010b8c3e0b5ff5519.tar.xz systemd-4edd65e4cff40158dded65c010b8c3e0b5ff5519.zip |
cgroup-util: add mask definitions for sets of controllers supported by cgroupsv1 vs. cgroupsv2
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/cgroup-util.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h index 73b431a27a..546b86eb7c 100644 --- a/src/basic/cgroup-util.h +++ b/src/basic/cgroup-util.h @@ -49,6 +49,16 @@ typedef enum CGroupMask { CGROUP_MASK_PIDS = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_PIDS), CGROUP_MASK_BPF_FIREWALL = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_FIREWALL), CGROUP_MASK_BPF_DEVICES = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_DEVICES), + + /* All real cgroupv1 controllers */ + CGROUP_MASK_V1 = CGROUP_MASK_CPU|CGROUP_MASK_CPUACCT|CGROUP_MASK_BLKIO|CGROUP_MASK_MEMORY|CGROUP_MASK_DEVICES|CGROUP_MASK_PIDS, + + /* All real cgroupv2 controllers */ + CGROUP_MASK_V2 = CGROUP_MASK_CPU|CGROUP_MASK_IO|CGROUP_MASK_MEMORY|CGROUP_MASK_PIDS, + + /* All cgroupv2 BPF pseudo-controllers */ + CGROUP_MASK_BPF = CGROUP_MASK_BPF_FIREWALL|CGROUP_MASK_BPF_DEVICES, + _CGROUP_MASK_ALL = CGROUP_CONTROLLER_TO_MASK(_CGROUP_CONTROLLER_MAX) - 1 } CGroupMask; |