No description
Find a file
Andrey Vagin bf67879062 crtools: rework freeze of processes (v2)
Before this patch crtools freezes processes and if something is changed,
it unfreezes all processes and starts again from the beginning.

If if are going to dump fork-bomb, this method doesn't work. Because a
big tree is always changed.

We don't need unfreeze processes, which have been frozen and this patch
does that.

This patch uses depth-first search (DFS) for traversing a process tree.

A root task is frozen at first turn, than a child is frozen, than a
child of child and so on.

When all children of one process are frozen, criu reads the list of
children again and check that nothing changed. This processes continues
until all of them will not be frozen. Afte that a new child can not be
appeared, because all children for children are frozen too.

v2: add comments in code
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-12-20 15:16:11 +04:00
arch headers: Drop uintX_t usage 2013-12-12 10:03:07 +04:00
Documentation docs: Add 'service' command description 2013-11-01 14:29:12 +04:00
include plugin: add a function to get a descriptor to the image dir 2013-12-19 21:49:39 +04:00
lib lib: return -EBADE instead of -1 2013-12-18 21:08:58 +04:00
pie plugin: allow to use logging function in plugins 2013-12-18 21:52:12 +04:00
protobuf make: protobuf -- Explicitly clean generated files 2013-12-13 15:58:32 +04:00
scripts make: add ldflags-so variable to make engine 2013-12-18 14:26:07 +04:00
test zdtm: add a new test, which creates and destroys threads 2013-12-19 22:53:42 +04:00
.gitignore git: Don't track *.so files 2013-08-29 14:48:17 +04:00
.mailmap repo: Add mailmap file 2012-03-25 23:31:20 +04:00
COPYING Add LGPL licence for library directory 2013-04-01 12:29:06 +04:00
cr-check.c criu check: don't run as non-root 2013-12-13 13:58:45 +04:00
cr-dedup.c dedup: Mark dedup_one_pagemap static 2013-12-18 14:57:17 +04:00
cr-dump.c crtools: rework freeze of processes (v2) 2013-12-20 15:16:11 +04:00
cr-exec.c crtools: don't include util.h in crtools.h 2013-11-06 15:42:12 +04:00
cr-restore.c crtools: preload libraries (v2) 2013-12-19 21:48:33 +04:00
cr-service.c service: Add coment about cr_dump_task() scripts code propagation 2013-12-18 21:24:52 +04:00
cr-show.c space-before-tab whitespace cleanup 2013-12-12 10:00:53 +04:00
CREDITS Add the CREDITS file 2012-07-30 13:52:37 +04:00
crtools crtools: rename binary to criu 2013-04-30 20:17:55 +04:00
crtools.c crtools: preload libraries (v2) 2013-12-19 21:48:33 +04:00
eventfd.c crtools: move pid_rst_prio to pid.h 2013-11-06 18:18:12 +04:00
eventpoll.c crtools: move pid_rst_prio to pid.h 2013-11-06 18:18:12 +04:00
fifo.c crtools: move pid_rst_prio to pid.h 2013-11-06 18:18:12 +04:00
file-ids.c x86: moved x86-specific files into the directory arch/x86. 2013-01-09 17:02:47 +04:00
file-lock.c crtools: move cr_options in a separate header 2013-11-06 18:17:52 +04:00
files-reg.c space-before-tab whitespace cleanup 2013-12-12 10:00:53 +04:00
files.c files: transfer file descriptor in dump_unsupp_fd 2013-12-18 21:54:11 +04:00
fsnotify.c whitespace-at-eol cleanup 2013-12-12 10:00:45 +04:00
image-desc.c net: Save and restore iptables in net namespace 2013-10-04 02:51:33 +04:00
image.c v3 Fix for open_pages_image_at to read if opened with O_RDWR 2013-12-18 14:50:47 +04:00
ipc_ns.c crtools: move cr_options in a separate header 2013-11-06 18:17:52 +04:00
kcmp-ids.c x86: moved x86-specific files into the directory arch/x86. 2013-01-09 17:02:47 +04:00
kerndat.c rst: Read sys.last_cap only once in kerndat 2013-10-12 00:03:25 +04:00
libnetlink.c netlink: Lower netlink error report log level 2013-07-04 15:49:02 +04:00
log.c pidfile: Don't push opts.pidfile as write_pidfile arg 2013-11-20 14:26:41 +04:00
Makefile crtools: preload libraries (v2) 2013-12-19 21:48:33 +04:00
Makefile.config string: Add strlcat helper 2013-11-29 15:36:07 +04:00
Makefile.crtools crtools: preload libraries (v2) 2013-12-19 21:48:33 +04:00
Makefile.inc systemd socket activation support 2013-12-12 09:58:50 +04:00
mem.c whitespace-at-eol cleanup 2013-12-12 10:00:45 +04:00
mount.c mnt_tree_for_each_reverse(): init a variable 2013-12-20 11:26:12 +04:00
namespaces.c whitespace-at-eol cleanup 2013-12-12 10:00:45 +04:00
net.c net: Don't create lo on netns restore 2013-11-08 16:52:20 +04:00
netfilter.c iptables: use cr_system instead of system 2013-10-02 20:09:37 +04:00
page-pipe.c headers: Move fcntl related data to include/fcntl.h 2013-11-14 22:13:10 +04:00
page-read.c page-read: Fix naming 2013-12-18 14:55:22 +04:00
page-xfer.c page-read: Fix naming 2013-12-18 14:55:22 +04:00
parasite-syscall.c crtools: move all stuff about fdset in a separate header 2013-11-06 15:24:48 +04:00
pipes.c crtools: move pid_rst_prio to pid.h 2013-11-06 18:18:12 +04:00
plugin.c crtools: preload libraries (v2) 2013-12-19 21:48:33 +04:00
proc_parse.c btrfs: Remove volume parsing code 2013-12-11 17:18:59 +04:00
protobuf-desc.c build: Generate most of the pb-desc automatically 2013-08-23 21:47:31 +04:00
protobuf.c crtools: don't include image.h in crtools.h 2013-11-06 15:42:09 +04:00
pstree.c pstree: don't include restorer.h in pstree.c 2013-11-08 16:46:32 +04:00
ptrace.c pr_perror(): don't end message with a period 2013-12-13 13:58:05 +04:00
rbtree.c code: Fix spaced indentation where found 2012-08-11 21:36:03 +04:00
README README: crtools to criu rename 2013-05-10 11:02:02 +04:00
rst-malloc.c whitespace-at-eol cleanup 2013-12-12 10:00:45 +04:00
sd-daemon.c systemd socket activation support 2013-12-12 09:58:50 +04:00
sd-daemon.h systemd socket activation support 2013-12-12 09:58:50 +04:00
security.c headers: Drop uintX_t usage 2013-12-12 10:03:07 +04:00
shmem.c headers: Move fcntl related data to include/fcntl.h 2013-11-14 22:13:10 +04:00
sigframe.c sigframe: don't include restorer.h 2013-11-06 12:37:38 +04:00
signalfd.c crtools: move pid_rst_prio to pid.h 2013-11-06 18:18:12 +04:00
sk-inet.c headers: Drop uintX_t usage 2013-12-12 10:03:07 +04:00
sk-netlink.c crtools: move pid_rst_prio to pid.h 2013-11-06 18:18:12 +04:00
sk-packet.c crtools: move all stuff about fdset in a separate header 2013-11-06 15:24:48 +04:00
sk-queue.c crtools: move pid_rst_prio to pid.h 2013-11-06 18:18:12 +04:00
sk-tcp.c tcp: restore the boundary between sent and unsent data 2013-11-14 17:15:44 +04:00
sk-unix.c unix: Move odev to kdev conversion into phys_stat_dev_match 2013-12-12 08:44:15 +04:00
sockets.c headers: Drop uintX_t usage 2013-12-12 10:03:07 +04:00
stats.c v2 stats: write stats at work directory 2013-11-16 00:05:53 +04:00
string.c string: Add strlcat helper 2013-11-29 15:36:07 +04:00
sysctl.c sysctl: Don't forget to close fds 2013-04-05 08:23:17 +04:00
tty.c tty: Print very descriptive message about shell job dump 2013-12-03 09:59:17 +04:00
tun.c crtools: move cr_options in a separate header 2013-11-06 18:17:52 +04:00
util.c plugin: add a function to get a descriptor to the image dir 2013-12-19 21:49:39 +04:00
uts_ns.c crtools: move pid_rst_prio to pid.h 2013-11-06 18:18:12 +04:00

criu
====

An utility to checkpoint/restore tasks.

Some code snippets are borrowed from

 - Linux kernel (http://kernel.org/)
 - git (http://git-scm.com/)
 - kvm-tools (https://github.com/penberg/linux-kvm)
 - ptrace-parasite (https://code.google.com/p/ptrace-parasite/)

Many thanks to these projects.

Licensed under GPLv2 (http://www.gnu.org/licenses/gpl-2.0.txt)