]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfsng: fully document struct hierarchy
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 17 Feb 2018 15:37:35 +0000 (16:37 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 17 Feb 2018 15:37:35 +0000 (16:37 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 17dfd5e8c508593dc6fe055d2cdbcd973335b944..37f009e068f4fca05e39257e518d445b3228c1b1 100644 (file)
@@ -61,15 +61,34 @@ lxc_log_define(lxc_cgfsng, lxc);
 
 static struct cgroup_ops cgfsng_ops;
 
-/*
- * A descriptor for a mounted hierarchy
- * @controllers: either NULL, or a null-terminated list of all
- *   the co-mounted controllers
- * @mountpoint: the mountpoint we will use.  It will be either
- *   /sys/fs/cgroup/controller or /sys/fs/cgroup/controllerlist
- * @base_cgroup: the cgroup under which the container cgroup path
-     is created.  This will be either the caller's cgroup (if not
-     root), or init's cgroup (if root).
+/* A descriptor for a mounted hierarchy
+ * @controllers:
+ * - legacy hierarchy:
+ *   Either NULL, or a null-terminated list of all the co-mounted controllers.
+ * - unified hierarchy:
+ *   Either NULL, or a null-terminated list of all enabled controllers.
+ * @mountpoint:
+ * - The mountpoint we will use.
+ * - legacy hierarchy:
+ *   It will be either /sys/fs/cgroup/controller or
+ *   /sys/fs/cgroup/controllerlist.
+ * - unified hierarchy:
+ *   It will either be /sys/fs/cgroup or /sys/fs/cgroup/<mountpoint-name>
+ *   depending on whether this is a hybrid cgroup layout (mix of legacy and
+ *   unified hierarchies) or a pure unified cgroup layout.
+ * @base_cgroup:
+ * - The cgroup under which the container cgroup path
+ *   is created. This will be either the caller's cgroup (if not root), or
+ *   init's cgroup (if root).
+ * @fullcgpath:
+ * - The full path to the containers cgroup.
+ * @version:
+ * - legacy hierarchy:
+ *   If the hierarchy is a legacy hierarchy this will be set to
+ *   CGROUP_SUPER_MAGIC.
+ * - unified hierarchy:
+ *   If the hierarchy is a legacy hierarchy this will be set to
+ *   CGROUP2_SUPER_MAGIC.
  */
 struct hierarchy {
        char **controllers;