2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-28 21:07:43 +00:00

542 Commits

Author SHA1 Message Date
Cyrill Gorcunov
b69aeb9a26 restore: Don't continue on opening vmas file failure
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-05 01:39:21 +04:00
Cyrill Gorcunov
2ae009ac1b restore: Don't forget to free temporary self VMAs
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-03 19:11:27 +04:00
Cyrill Gorcunov
f63777d2be restorer: Setup rt_sigframe to a proper address
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-03 15:24:40 +04:00
Cyrill Gorcunov
489745f235 restore: A number of fixups and debug printing
An idea is to align restorer size to be sure it
wont be stripped in a middle of code.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-03 11:58:45 +04:00
Cyrill Gorcunov
dfe814aa58 restore: Unmap running VMAs
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-27 18:59:21 +04:00
Cyrill Gorcunov
57971f721d restorer: Some preliminary work initiated on mmap heuristics
Just to not lose the snippet.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-27 00:57:01 +04:00
Cyrill Gorcunov
aaf3291e00 restore: Dump current VMAs
Restorer needs to know which VMAs
to unmap before map a new set.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-26 22:50:46 +04:00
Cyrill Gorcunov
214b8a6a27 restore: Update memory size needed for restorer code
Since VMA areas are allocated with page granularity
better to reflect this in mmap request. This would
allow the restorer to do munmap on page boundaries.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-26 18:13:06 +04:00
Cyrill Gorcunov
66c1464e40 restore: Drop unneded variables
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-26 18:07:33 +04:00
Cyrill Gorcunov
168d8cf17d restore: restorer is finally alive
No real restore code yet, but at least it
produce message ;)

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-26 17:35:50 +04:00
Cyrill Gorcunov
791f2c8c25 restore: Call for indirect execution
Doesn't work at moment but just to have
a snapshot point.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-26 11:16:00 +04:00
Cyrill Gorcunov
ae41bc9d2a restore: Add restore_core_args facility
More convenient instead of manual offset calculations.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-26 00:30:41 +04:00
Cyrill Gorcunov
0133a23a5e restore: Add opening core file
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-25 21:25:42 +04:00
Cyrill Gorcunov
63e08215aa restore: Add restorer test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-24 22:23:06 +04:00
Cyrill Gorcunov
0259dd01c0 restore: Use open_fmt_ro helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-24 13:56:21 +04:00
Cyrill Gorcunov
f8ad351f4d util: Make open_fmt being more general
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-24 13:51:41 +04:00
Cyrill Gorcunov
26857cc4e5 util: Move various helpers there
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-24 13:43:21 +04:00
Cyrill Gorcunov
f08ba92df2 restore: Update real_pid comment
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-13 18:15:09 +04:00
Cyrill Gorcunov
d2f505f52c restore: Add some more comments
Add comments on real_pid member and pipe users counters.

Reported-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-13 17:31:52 +04:00
Pavel Emelyanov
c416a033f9 Rename execute_image to prepare_and_execute_image
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-13 15:46:04 +04:00
Pavel Emelyanov
1f14766919 Generalize file opening
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-12 18:34:15 +04:00
Cyrill Gorcunov
609e431376 Add cr_options structure
We will need more options since the
tool should support both cgroups freezer
and a regular task stop/dump/restore/continue
transition.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-04 01:50:19 +04:00
Cyrill Gorcunov
a00ef142f8 Use pr_err for error printing
To follow kernel style

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-30 14:37:12 +04:00
Cyrill Gorcunov
65e9402d47 restore: Fix pipes restore if both pipe ends are used by former process
In case if the former process used both pipe ends we fall
into endless loop since the 'users' never reaches 1. So
to resolve this during the pipe collectioning we check if
both pipe ends were used by a former process and if so --
we connect first pipe end immediately in create_pipe and
connect the rest via  attach_pipe.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-30 09:00:45 +04:00
Cyrill Gorcunov
61a6eb781c restore: Make sure shmems are zeroified
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-30 01:13:16 +04:00
Cyrill Gorcunov
843432fefd restore: Use pr_error instead of stderr output
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-29 01:24:23 +04:00
Cyrill Gorcunov
114d89cc89 restore: Use pipeid in pipe_info to match pipe_entry
To have similar naming scheme.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-29 00:50:09 +04:00
Cyrill Gorcunov
58a4a82528 restore: Fix typo in try_fixup_file_map
vma_entry is already a pointer -- no need
for second ampersand.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-28 23:23:43 +04:00
Cyrill Gorcunov
11cf71c542 restore: Tune up fixup_pages_data
Use pr_panic if ending-zero page is missed
(also a few style tuneups).

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-28 21:20:53 +04:00
Cyrill Gorcunov
1293fb0f8e restore: Make should_restore_page being bool
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-28 18:44:46 +04:00
Cyrill Gorcunov
4727c73984 restore: Simplify try_fixup_file_map
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-28 16:49:59 +04:00
Cyrill Gorcunov
6978194642 restore: Use shmid instead of id, as declared in image file
To not bring in varying member name with same meaning.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-28 15:55:12 +04:00
Cyrill Gorcunov
8800be50f8 restore: Use find_ prefix searching routines
To make a consistent scheme.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-28 14:45:30 +04:00
Cyrill Gorcunov
3971dbb78d restore: File mappings should use process pid as well
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-28 13:19:30 +04:00
Cyrill Gorcunov
2de8de5d4e restore: Rename try_to_add into collect_ routines
As they are. Also add some more debug printing on
pipe users in debug purpose.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-28 01:09:34 +04:00
Cyrill Gorcunov
af1dfdda5e restore: Add comment about closing pipes descriptors
Also a few style nitpicks.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-27 20:23:26 +04:00
Cyrill Gorcunov
5498ed173b restore: Use close_safe for pipes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-27 18:50:02 +04:00
Cyrill Gorcunov
9212f2e847 restore: Drop unneded perror's
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-27 18:48:57 +04:00
Andrew Vagin
b1739c08f5 restore: fix counter in pipe_entry
The counter should be incremented all times, when new user is found.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
2011-09-27 12:55:05 +04:00
Cyrill Gorcunov
06ae1f8697 restore: Drop a few style rudiments from code
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-27 01:14:38 +04:00
Cyrill Gorcunov
961fcdc697 restore: Cleanup fixup_vma_fds a bit
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-26 18:14:39 +04:00
Cyrill Gorcunov
523de23624 Initial commit
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-23 12:00:45 +04:00