Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
16a2cde9
Unverified
Commit
16a2cde9
authored
Feb 17, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgfsng: fully document struct cgfsng_handler_data
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
9e288301
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
21 deletions
+50
-21
cgfsng.c
src/lxc/cgroups/cgfsng.c
+50
-21
No files found.
src/lxc/cgroups/cgfsng.c
View file @
16a2cde9
...
@@ -62,31 +62,36 @@ lxc_log_define(lxc_cgfsng, lxc);
...
@@ -62,31 +62,36 @@ lxc_log_define(lxc_cgfsng, lxc);
static
struct
cgroup_ops
cgfsng_ops
;
static
struct
cgroup_ops
cgfsng_ops
;
/* A descriptor for a mounted hierarchy
/* A descriptor for a mounted hierarchy
* @controllers:
*
* - legacy hierarchy:
* @controllers
* - legacy hierarchy
* Either NULL, or a null-terminated list of all the co-mounted controllers.
* Either NULL, or a null-terminated list of all the co-mounted controllers.
* - unified hierarchy
:
* - unified hierarchy
* Either NULL, or a null-terminated list of all enabled controllers.
* Either NULL, or a null-terminated list of all enabled controllers.
* @mountpoint:
*
* @mountpoint
* - The mountpoint we will use.
* - The mountpoint we will use.
* - legacy hierarchy
:
* - legacy hierarchy
* It will be either /sys/fs/cgroup/controller or
* It will be either /sys/fs/cgroup/controller or
* /sys/fs/cgroup/controllerlist.
* /sys/fs/cgroup/controllerlist.
* - unified hierarchy
:
* - unified hierarchy
* It will either be /sys/fs/cgroup or /sys/fs/cgroup/<mountpoint-name>
* 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
* depending on whether this is a hybrid cgroup layout (mix of legacy and
* unified hierarchies) or a pure unified cgroup layout.
* unified hierarchies) or a pure unified cgroup layout.
* @base_cgroup:
*
* @base_cgroup
* - The cgroup under which the container cgroup path
* - The cgroup under which the container cgroup path
* is created. This will be either the caller's cgroup (if not root), or
* is created. This will be either the caller's cgroup (if not root), or
* init's cgroup (if root).
* init's cgroup (if root).
* @fullcgpath:
*
* @fullcgpath
* - The full path to the containers cgroup.
* - The full path to the containers cgroup.
* @version:
*
* - legacy hierarchy:
* @version
* - legacy hierarchy
* If the hierarchy is a legacy hierarchy this will be set to
* If the hierarchy is a legacy hierarchy this will be set to
* CGROUP_SUPER_MAGIC.
* CGROUP_SUPER_MAGIC.
* - unified hierarchy
:
* - unified hierarchy
* If the hierarchy is a legacy hierarchy this will be set to
* If the hierarchy is a legacy hierarchy this will be set to
* CGROUP2_SUPER_MAGIC.
* CGROUP2_SUPER_MAGIC.
*/
*/
...
@@ -98,16 +103,40 @@ struct hierarchy {
...
@@ -98,16 +103,40 @@ struct hierarchy {
int
version
;
int
version
;
};
};
/*
/* The cgroup data which is attached to the lxc_handler.
* The cgroup data which is attached to the lxc_handler.
*
* @cgroup_pattern : A copy of the lxc.cgroup.pattern
* @cgroup_pattern
* @container_cgroup : If not null, the cgroup which was created for the
* - A copy of lxc.cgroup.pattern.
* container. For each hierarchy, it is created under the
*
* @hierarchy->base_cgroup directory. Relative to the
* @container_cgroup
* base_cgroup it is the same for all hierarchies.
* - If not null, the cgroup which was created for the container. For each
* @name : The name of the container.
* hierarchy, it is created under the @hierarchy->base_cgroup directory.
* @cgroup_meta : A copy of the container's cgroup information. This
* Relative to the base_cgroup it is the same for all hierarchies.
* overrides @cgroup_pattern.
*
* @name
* - The name of the container.
*
* @cgroup_meta
* - A copy of the container's cgroup information. This overrides
* @cgroup_pattern.
*
* @cgroup_layout:
* - What cgroup layout the container is running with
* - CGROUP_LAYOUT_UNKNOWN
* The cgroup layout could not be determined. This should be treated as an
* error condition.
* - CGROUP_LAYOUT_LEGACY
* The container is running with all controllers mounted into legacy cgroup
* hierarchies.
* - CGROUP_LAYOUT_HYBRID
* The container is running with at least one controller mounted into a
* legacy cgroup hierarchy and a mountpoint for the unified hierarchy. The
* unified hierarchy can be empty (no controllers enabled) or non-empty
* (controllers enabled).
* - CGROUP_LAYOUT_UNIFIED
* The container is running on a pure unified cgroup hierarchy. The unified
* hierarchy can be empty (no controllers enabled) or non-empty (controllers
* enabled).
*/
*/
struct
cgfsng_handler_data
{
struct
cgfsng_handler_data
{
char
*
cgroup_pattern
;
char
*
cgroup_pattern
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment