2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

config/rpc: add new option --mntns-compat-mode for old mount engine

We plan to switch to Mounts-v2 engine for restoring mounts by default,
this options is to allow switching to old engine. This patch only adds
an option, no engine behind it yet.

Cherry-picked from Virtuozzo criu:
https://src.openvz.org/projects/OVZ/repos/criu/commits/503f9ad2c

Changes: allow --mntns-compat-mode option only on restore and only if
MOVE_MOUNT_SET_GROUP is supported (this also requires change in
unittest/mock.c), change id in rpc criu_opts.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
Pavel Tikhomirov
2020-05-25 17:43:48 +03:00
committed by Andrei Vagin
parent f6b52c711e
commit f2d1c7fab8
11 changed files with 62 additions and 0 deletions

View File

@@ -1170,6 +1170,17 @@ int criu_set_page_server_address_port(const char *address, int port)
return criu_local_set_page_server_address_port(global_opts, address, port);
}
void criu_local_set_mntns_compat_mode(criu_opts *opts, bool val)
{
opts->rpc->has_mntns_compat_mode = true;
opts->rpc->mntns_compat_mode = val;
}
void criu_set_mntns_compat_mode(bool val)
{
criu_local_set_mntns_compat_mode(global_opts, val);
}
static CriuResp *recv_resp(int socket_fd)
{
struct msghdr msg_hdr = { 0 };