mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-23 02:17:22 +00:00
rpc: Add interface --freeze-cgroup option
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
55de67a7fa
commit
85578bd5e8
@ -454,6 +454,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
|
|||||||
opts.manage_cgroups = mode;
|
opts.manage_cgroups = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (req->freeze_cgroup)
|
||||||
|
opts.freeze_cgroup = req->freeze_cgroup;
|
||||||
|
|
||||||
if (req->cgroup_props)
|
if (req->cgroup_props)
|
||||||
opts.cgroup_props = req->cgroup_props;
|
opts.cgroup_props = req->cgroup_props;
|
||||||
|
|
||||||
|
@ -101,6 +101,8 @@ message criu_opts {
|
|||||||
optional string cgroup_props = 41;
|
optional string cgroup_props = 41;
|
||||||
optional string cgroup_props_file = 42;
|
optional string cgroup_props_file = 42;
|
||||||
repeated string cgroup_dump_controller = 43;
|
repeated string cgroup_dump_controller = 43;
|
||||||
|
|
||||||
|
optional string freeze_cgroup = 44;
|
||||||
}
|
}
|
||||||
|
|
||||||
message criu_dump_resp {
|
message criu_dump_resp {
|
||||||
|
10
lib/c/criu.c
10
lib/c/criu.c
@ -385,6 +385,16 @@ void criu_set_manage_cgroups_mode(enum criu_cg_mode mode)
|
|||||||
criu_local_set_manage_cgroups_mode(global_opts, mode);
|
criu_local_set_manage_cgroups_mode(global_opts, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void criu_local_set_freeze_cgroup(criu_opts *opts, char *name)
|
||||||
|
{
|
||||||
|
opts->rpc->freeze_cgroup = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void criu_set_freeze_cgroup(char *name)
|
||||||
|
{
|
||||||
|
criu_local_set_freeze_cgroup(global_opts, name);
|
||||||
|
}
|
||||||
|
|
||||||
void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val)
|
void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val)
|
||||||
{
|
{
|
||||||
opts->rpc->has_auto_ext_mnt = true;
|
opts->rpc->has_auto_ext_mnt = true;
|
||||||
|
@ -78,6 +78,7 @@ void criu_set_cpu_cap(unsigned int cap);
|
|||||||
void criu_set_root(char *root);
|
void criu_set_root(char *root);
|
||||||
void criu_set_manage_cgroups(bool manage);
|
void criu_set_manage_cgroups(bool manage);
|
||||||
void criu_set_manage_cgroups_mode(enum criu_cg_mode mode);
|
void criu_set_manage_cgroups_mode(enum criu_cg_mode mode);
|
||||||
|
void criu_set_freeze_cgroup(char *name);
|
||||||
void criu_set_auto_ext_mnt(bool val);
|
void criu_set_auto_ext_mnt(bool val);
|
||||||
void criu_set_ext_sharing(bool val);
|
void criu_set_ext_sharing(bool val);
|
||||||
void criu_set_ext_masters(bool val);
|
void criu_set_ext_masters(bool val);
|
||||||
@ -180,6 +181,7 @@ void criu_local_set_cpu_cap(criu_opts *opts, unsigned int cap);
|
|||||||
void criu_local_set_root(criu_opts *opts, char *root);
|
void criu_local_set_root(criu_opts *opts, char *root);
|
||||||
void criu_local_set_manage_cgroups(criu_opts *opts, bool manage);
|
void criu_local_set_manage_cgroups(criu_opts *opts, bool manage);
|
||||||
void criu_local_set_manage_cgroups_mode(criu_opts *opts, enum criu_cg_mode mode);
|
void criu_local_set_manage_cgroups_mode(criu_opts *opts, enum criu_cg_mode mode);
|
||||||
|
void criu_local_set_freeze_cgroup(criu_opts *opts, char *name);
|
||||||
void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val);
|
void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val);
|
||||||
void criu_local_set_ext_sharing(criu_opts *opts, bool val);
|
void criu_local_set_ext_sharing(criu_opts *opts, bool val);
|
||||||
void criu_local_set_ext_masters(criu_opts *opts, bool val);
|
void criu_local_set_ext_masters(criu_opts *opts, bool val);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user