mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
Adding --pre-dump-mode option
Two modes of pre-dump algorithm: 1) splicing memory by parasite --pre-dump-mode=splice (default) 2) using process_vm_readv syscall --pre-dump-mode=read Signed-off-by: Abhishek Dubey <dubeyabhishek777@gmail.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
committed by
Andrei Vagin
parent
576a99f492
commit
20d4920a8b
15
lib/c/criu.c
15
lib/c/criu.c
@@ -336,6 +336,21 @@ int criu_set_parent_images(const char *path)
|
||||
return criu_local_set_parent_images(global_opts, path);
|
||||
}
|
||||
|
||||
int criu_local_set_pre_dump_mode(criu_opts *opts, enum criu_pre_dump_mode mode)
|
||||
{
|
||||
opts->rpc->has_pre_dump_mode = true;
|
||||
if (mode == CRIU_PRE_DUMP_SPLICE || mode == CRIU_PRE_DUMP_READ) {
|
||||
opts->rpc->pre_dump_mode = mode;
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int criu_set_pre_dump_mode(enum criu_pre_dump_mode mode)
|
||||
{
|
||||
return criu_local_set_pre_dump_mode(global_opts, mode);
|
||||
}
|
||||
|
||||
void criu_local_set_track_mem(criu_opts *opts, bool track_mem)
|
||||
{
|
||||
opts->rpc->has_track_mem = true;
|
||||
|
Reference in New Issue
Block a user