Skip to content

Commit

Permalink
cgroup2: add minimal cgroup2 support
Browse files Browse the repository at this point in the history
The runc test cases are (sometimes) mounting a cgroup inside of the
container. For these tests to succeed, let CRIU know that cgroup2 exists
and how to restore such a mount.

This does not fix any specific cgroup2 settings, it just enables CRIU to
mount cgroup2 in the restored container.

Signed-off-by: Adrian Reber <[email protected]>
  • Loading branch information
adrianreber committed Feb 7, 2020
1 parent 0ac0f68 commit 3a15076
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions criu/filesystems.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,11 @@ static struct fstype fstypes[] = {
.code = FSTYPE__CGROUP,
.parse = cgroup_parse,
.sb_equal = cgroup_sb_equal,
}, {
.name = "cgroup2",
.code = FSTYPE__CGROUP2,
.parse = cgroup_parse,
.sb_equal = cgroup_sb_equal,
}, {
.name = "aufs",
.code = FSTYPE__AUFS,
Expand Down
2 changes: 2 additions & 0 deletions images/mnt.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ enum fstype {
// RPC_PIPEFS = 20;
// NFS = 21;
// NFS4 = 22;

CGROUP2 = 23;
};

message mnt_entry {
Expand Down

0 comments on commit 3a15076

Please sign in to comment.