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
f0c8014d
Unverified
Commit
f0c8014d
authored
Feb 21, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: s/cgfd_limit/dfd_lim/g
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
1116fcb3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
cgfsng.c
src/lxc/cgroups/cgfsng.c
+5
-5
cgroup.c
src/lxc/cgroups/cgroup.c
+1
-1
cgroup.h
src/lxc/cgroups/cgroup.h
+1
-1
cgroup2_devices.c
src/lxc/cgroups/cgroup2_devices.c
+2
-2
commands.c
src/lxc/commands.c
+2
-2
No files found.
src/lxc/cgroups/cgfsng.c
View file @
f0c8014d
...
...
@@ -402,7 +402,7 @@ static int cgroup_hierarchy_add(struct cgroup_ops *ops, int dfd_mnt, char *mnt,
return
ret_errno
(
ENOMEM
);
new
->
dfd_con
=
-
EBADF
;
new
->
cgfd_limit
=
-
EBADF
;
new
->
dfd_lim
=
-
EBADF
;
new
->
dfd_mon
=
-
EBADF
;
new
->
fs_type
=
fs_type
;
...
...
@@ -805,9 +805,9 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
h
->
container_full_path
=
move_ptr
(
path
);
if
(
fd_limit
<
0
)
h
->
cgfd_limit
=
h
->
dfd_con
;
h
->
dfd_lim
=
h
->
dfd_con
;
else
h
->
cgfd_limit
=
move_fd
(
fd_limit
);
h
->
dfd_lim
=
move_fd
(
fd_limit
);
if
(
limit_path
)
h
->
container_limit_path
=
move_ptr
(
limit_path
);
...
...
@@ -827,11 +827,11 @@ static void cgroup_tree_prune_leaf(struct hierarchy *h, const char *path_prune,
if
(
payload
)
{
/* Check whether we actually created the cgroup to prune. */
if
(
h
->
cgfd_limit
<
0
)
if
(
h
->
dfd_lim
<
0
)
prune
=
false
;
free_equal
(
h
->
container_full_path
,
h
->
container_limit_path
);
close_equal
(
h
->
dfd_con
,
h
->
cgfd_limit
);
close_equal
(
h
->
dfd_con
,
h
->
dfd_lim
);
}
else
{
/* Check whether we actually created the cgroup to prune. */
if
(
h
->
dfd_mon
<
0
)
...
...
src/lxc/cgroups/cgroup.c
View file @
f0c8014d
...
...
@@ -91,7 +91,7 @@ void cgroup_exit(struct cgroup_ops *ops)
free_equal
((
*
it
)
->
container_full_path
,
(
*
it
)
->
container_limit_path
);
close_equal
((
*
it
)
->
dfd_con
,
(
*
it
)
->
cgfd_limit
);
close_equal
((
*
it
)
->
dfd_con
,
(
*
it
)
->
dfd_lim
);
if
((
*
it
)
->
dfd_mon
>=
0
)
close
((
*
it
)
->
dfd_mon
);
...
...
src/lxc/cgroups/cgroup.h
View file @
f0c8014d
...
...
@@ -99,7 +99,7 @@ struct hierarchy {
* @container_limit_path.
* Will be equal to @dfd_con if no limiting cgroup has been requested.
*/
int
cgfd_limit
;
int
dfd_lim
;
/* File descriptor for the monitor's cgroup. */
int
dfd_mon
;
...
...
src/lxc/cgroups/cgroup2_devices.c
View file @
f0c8014d
...
...
@@ -609,7 +609,7 @@ bool bpf_cgroup_devices_attach(struct cgroup_ops *ops,
return
syserrno
(
false
,
"Failed to create bpf program"
);
ret
=
bpf_program_cgroup_attach
(
prog
,
BPF_CGROUP_DEVICE
,
ops
->
unified
->
cgfd_limit
,
ops
->
unified
->
dfd_lim
,
BPF_F_ALLOW_MULTI
);
if
(
ret
)
return
syserrno
(
false
,
"Failed to attach bpf program"
);
...
...
@@ -635,7 +635,7 @@ bool bpf_cgroup_devices_update(struct cgroup_ops *ops,
if
(
!
pure_unified_layout
(
ops
))
return
ret_set_errno
(
false
,
EINVAL
);
if
(
ops
->
unified
->
cgfd_limit
<
0
)
if
(
ops
->
unified
->
dfd_lim
<
0
)
return
ret_set_errno
(
false
,
EBADF
);
/*
...
...
src/lxc/commands.c
View file @
f0c8014d
...
...
@@ -898,7 +898,7 @@ static int lxc_cmd_stop_callback(int fd, struct lxc_cmd_req *req,
TRACE
(
"Sent signal %d to pidfd %d"
,
stopsignal
,
handler
->
pid
);
if
(
pure_unified_layout
(
cgroup_ops
))
ret
=
__cgroup_unfreeze
(
cgroup_ops
->
unified
->
cgfd_limit
,
-
1
);
ret
=
__cgroup_unfreeze
(
cgroup_ops
->
unified
->
dfd_lim
,
-
1
);
else
ret
=
cgroup_ops
->
unfreeze
(
cgroup_ops
,
-
1
);
if
(
ret
)
...
...
@@ -1518,7 +1518,7 @@ static int lxc_cmd_get_cgroup2_fd_callback_do(int fd, struct lxc_cmd_req *req,
if
(
!
pure_unified_layout
(
ops
)
||
!
ops
->
unified
)
return
lxc_cmd_rsp_send
(
fd
,
&
rsp
);
send_fd
=
limiting_cgroup
?
ops
->
unified
->
cgfd_limit
send_fd
=
limiting_cgroup
?
ops
->
unified
->
dfd_lim
:
ops
->
unified
->
dfd_con
;
rsp
.
ret
=
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