No description
Find a file
Andrew Vagin 10af342f31 mnt: clean up a root yard after openning all files
The root yard is used to clean up ghost files.

Now try_clean_remaps() is called from depopulate_roots_yard(), so
the code about switching mount namespaces was moved to
depopulate_roots_yard().

v2: call clean_remaps() when processes are restored in
    the host mount namespace.

Now depopulate_roots_yard() is called from the root task before
finishing CR_STATE_FORKING.

I moved it to the criu process and do it after clean_remaps(), because
clean_remaps() uses the roots yard.

It's called after openning all files, because only at this moment we can
be sure that all link remap files can be removed.

restore_task_with_children()		| restore_root_task()
-----------------------------------------------------------------------
depopulate_roots_yard()			|
restore_finish_stage(CR_STATE_FORKING)	|
prepare_fds()				|
open_vmas()				|
					| restore_switch_stage(CR_STATE_RESTORE_SIGCHLD)
					| clean_remaps = 0;

If something fails between CR_STATE_FORKING and CR_STATE_RESTORE_SIGCHLD,
try_clean_remaps will be called().

try_clean_remaps()
  try_clean_ghost()
    rst_get_mnt_root()
      print_ns_root()
	snprintf(buf, bs, "%s/%d", mnt_roots, ns->id);

it uses mnt_roots, actually it is what we called the roots yard.

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-08-01 16:51:33 +03:00
contrib Add OverlayFS support to docker_cr.sh 2015-08-18 18:14:32 +03:00
coredump coredump: Rename dir to coredump 2016-06-28 13:04:58 +03:00
crit crit/decode: set default opts['nopl'] to False 2016-05-30 13:47:54 +03:00
criu mnt: clean up a root yard after openning all files 2016-08-01 16:51:33 +03:00
Documentation criu: fix some spelling errors in criu.txt 2016-06-28 13:12:59 +03:00
images ipc/sysctl: c/r fs.mqueue.msg_default fs.mqueue.msgsize_default 2016-08-01 16:51:33 +03:00
lib criu: almost fix building on Alpine Linux 2016-07-09 22:04:26 +03:00
scripts travis: run test/others/exec 2016-08-01 16:51:33 +03:00
test zdtm.py: check restore when criu dump runs over a non-root user 2016-08-01 16:51:33 +03:00
.gitignore uninstall: use --record with setup.py, v2 2016-05-06 14:38:29 +03:00
.mailmap repo: Add mailmap file 2012-03-25 23:31:20 +04:00
.travis.yml travis: build tests in a separate job 2016-08-01 16:51:05 +03:00
COPYING Add LGPL licence for library directory 2013-04-01 12:29:06 +04:00
CREDITS Add the CREDITS file 2012-07-30 13:52:37 +04:00
INSTALL.md build: Add INSTALL.md and update "make help" 2016-05-06 14:38:29 +03:00
Makefile zdtm: use flake8 to verify zdtm.py 2016-06-28 13:09:35 +03:00
Makefile.install autofs: install -- Ship scripts/systemd-autofs-restart.sh 2016-07-05 23:18:15 +03:00
Makefile.versions criu: Version 2.4 2016-07-11 13:43:45 +03:00
README.md Add ascciinema tour on basic criu features. 2016-06-16 16:37:06 +03:00

CRIU (Checkpoint and Restore in Userspace)

An utility to checkpoint/restore tasks. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space.

The project home is at http://criu.org.

Pages worth starting with are:

A video tour on basic CRIU features

CRIU introduction

How to contribute