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
bf90d192
Unverified
Commit
bf90d192
authored
Feb 21, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: handle lxc.cgroup.use global parameter
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
028afdc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
cgfsng.c
src/lxc/cgroups/cgfsng.c
+7
-7
No files found.
src/lxc/cgroups/cgfsng.c
View file @
bf90d192
...
...
@@ -275,7 +275,7 @@ static inline bool is_unified_hierarchy(const struct hierarchy *h)
/* Return true if the controller @entry is found in the null-terminated list of
* hierarchies @hlist.
*/
static
bool
controller_
found
(
struct
hierarchy
**
hlist
,
char
*
entry
)
static
bool
controller_
available
(
struct
hierarchy
**
hlist
,
char
*
entry
)
{
if
(
!
hlist
)
return
false
;
...
...
@@ -287,10 +287,7 @@ static bool controller_found(struct hierarchy **hlist, char *entry)
return
false
;
}
/* Return true if all of the controllers which we require have been found. The
* required list is freezer and anything in lxc.cgroup.use.
*/
__lxc_unused
static
bool
all_controllers_found
(
struct
cgroup_ops
*
ops
)
static
bool
controllers_available
(
struct
cgroup_ops
*
ops
)
{
struct
hierarchy
**
hlist
;
...
...
@@ -299,8 +296,8 @@ __lxc_unused static bool all_controllers_found(struct cgroup_ops *ops)
hlist
=
ops
->
hierarchies
;
for
(
char
**
cur
=
ops
->
cgroup_use
;
cur
&&
*
cur
;
cur
++
)
if
(
!
controller_
found
(
hlist
,
*
cur
))
return
log_error
(
false
,
"
No %s controller mountpoint
found"
,
*
cur
);
if
(
!
controller_
available
(
hlist
,
*
cur
))
return
log_error
(
false
,
"
The %s controller
found"
,
*
cur
);
return
true
;
}
...
...
@@ -3225,6 +3222,9 @@ static int __initialize_cgroups(struct cgroup_ops *ops, bool relative,
}
}
if
(
!
controllers_available
(
ops
))
return
syserrno_set
(
-
ENOENT
,
"One or more requested controllers unavailable or not delegated"
);
return
0
;
}
...
...
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