[CRIU] [PATCH 2/3] rpc: Add "cgroup root" fields to criu_opts
Pavel Emelyanov
xemul at parallels.com
Fri Aug 22 05:11:27 PDT 2014
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
diff --git a/cr-service.c b/cr-service.c
index c00413c..d5a4737 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 7098111..46fba60 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 {
More information about the CRIU
mailing list