diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2014-08-22 16:11:27 +0400 |
---|---|---|
committer | Pavel Emelyanov <xemul@parallels.com> | 2014-08-22 19:20:04 +0400 |
commit | 070757c142b028df3bf324a1861361b588746286 (patch) | |
tree | 1e8863556f578ec726b045f41114520321e53dc3 | |
parent | 7947ea7111276b6789f639784f093bbb8a9f8a56 (diff) |
rpc: Add "cgroup root" fields to criu_opts
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
-rw-r--r-- | cr-service.c | 7 | ||||
-rw-r--r-- | protobuf/rpc.proto | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/cr-service.c b/cr-service.c index c00413c7a..d5a47377c 100644 --- a/cr-service.c +++ b/cr-service.c @@ -24,6 +24,7 @@ #include "page-xfer.h" #include "net.h" #include "mount.h" +#include "cgroup.h" unsigned int service_sk_ino = -1; @@ -301,6 +302,12 @@ static int setup_opts_from_req(int sk, CriuOpts *req) return -1; } + for (i = 0; i < req->n_cg_root; i++) { + if (new_cg_root_add(req->cg_root[i]->ctrl, + req->cg_root[i]->path)) + return -1; + } + if (req->has_cpu_cap) opts.cpu_cap = req->cpu_cap; diff --git a/protobuf/rpc.proto b/protobuf/rpc.proto index 7098111ba..46fba60ed 100644 --- a/protobuf/rpc.proto +++ b/protobuf/rpc.proto @@ -14,6 +14,11 @@ message ext_mount_map { required string val = 2; }; +message cgroup_root { + optional string ctrl = 1; + required string path = 2; +}; + message criu_opts { required int32 images_dir_fd = 1; optional int32 pid = 2; /* if not set on dump, will dump requesting process */ @@ -46,6 +51,7 @@ message criu_opts { repeated ext_mount_map ext_mnt = 23; optional bool manage_cgroups = 24; + repeated cgroup_root cg_root = 25; } message criu_dump_resp { |