Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTycho Andersen <tycho.andersen@canonical.com>2016-02-21 22:28:50 +0300
committerPavel Emelyanov <xemul@virtuozzo.com>2016-02-24 13:07:02 +0300
commit6e33d08045b5141a652c088591f0ba45cc0d9cca (patch)
tree6983340b965ee2b3d148f671339fb929026488fd /images/core.proto
parenta80dec3fb1539b816e80cf8019bb9fd3cb2d62d7 (diff)
cgroup: add support for cgroup namespaces
cgroup namespaces are imminent to be merged into the kernel (indeed, they went into and out of 4.5 for minor issues), and will be carried as a patchset in the ubuntu 16.04 kernel. Here's an attempt at c/r. There are essentially three key steps: * on dump, in parse_task_cgroup, we should ask the task what cgroups it thinks it is in (unless it has the same cgroup ns id as its parent, then we should just take the prefixes from the parent's set), and set the prefix on the cg set * add a new restore step, prepare_cgroup_namespace(), which happens in prepare_task_cgroup() that does an unshare() if necessary * when restoring, in move_in_cgroup, if we're going to restore via usernsd, leave the full path. if not, use (cgset->path + len(cgset->cgns_prefix) as the path, since we will have already moved into the cgns_prefix and unshared. Another observation here is that we can support nesting, since these are restored heirarchically by nature. v2: * store cgns prefix length instead of full prefix in images * set has_cgroup_ns_id conditionally * drop unused argument to move_in_cgroup * add extra comments about what is happening when unsharing() on restore * add extra comments about what is happening when computing the actual cgns prefix Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Diffstat (limited to 'images/core.proto')
-rw-r--r--images/core.proto1
1 files changed, 1 insertions, 0 deletions
diff --git a/images/core.proto b/images/core.proto
index 6def5d9a1..824ee26e5 100644
--- a/images/core.proto
+++ b/images/core.proto
@@ -57,6 +57,7 @@ message task_kobj_ids_entry {
optional uint32 uts_ns_id = 8;
optional uint32 mnt_ns_id = 9;
optional uint32 user_ns_id = 10;
+ optional uint32 cgroup_ns_id = 11;
}
message thread_sas_entry {