From: Christian Brauner Date: Sun, 21 Feb 2021 10:22:59 +0000 (+0100) Subject: cgroups: move cgroup2 parameters into substruct X-Git-Tag: lxc-5.0.0~274^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cd3a764562841451f8df13e4649b13d0c251d69;p=thirdparty%2Flxc.git cgroups: move cgroup2 parameters into substruct Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgroup.h b/src/lxc/cgroups/cgroup.h index 8b34dff5b..b7d75ea3b 100644 --- a/src/lxc/cgroups/cgroup.h +++ b/src/lxc/cgroups/cgroup.h @@ -77,18 +77,8 @@ typedef enum { * CGROUP2_SUPER_MAGIC. */ struct hierarchy { - /* - * cgroup2 only: what files need to be chowned to delegate a cgroup to - * an unprivileged user. - */ - char **cgroup2_chown; - char **controllers; cgroupfs_type_magic_t fs_type; - /* cgroup2 only */ - unsigned int bpf_device_controller:1; - unsigned int freezer_controller:1; - /* File descriptor for the container's cgroup @path_con. */ int dfd_con; char *path_con; @@ -111,6 +101,19 @@ struct hierarchy { /* File descriptor for the controller's base cgroup path @at_base. */ int dfd_base; char *at_base; + + struct /* unified hierarchy specific */ { + /* + * cgroup2 only: what files need to be chowned to delegate a + * cgroup to an unprivileged user. + */ + char **cgroup2_chown; + /* cgroup2 only */ + unsigned int bpf_device_controller : 1; + unsigned int freezer_controller : 1; + }; + + char **controllers; }; struct cgroup_ops {