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

13 Commits

Author SHA1 Message Date
Andrey Vagin
58e22f31fc mount: Add support of tmpfs (v3)
When dumping a tmpfs mount we need to take its contents with us.
So, use tar for it and put it into the image dir.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 19:51:22 +04:00
Andrey Vagin
d0fd98c9fc show: don't show RAW images in show_all
If an image isn't specified, crtool shows content of all images.
Now crtools aborts in this case due to BUG_ON(1) in show methods
for raw images. I sugget to skip such images.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 16:22:32 +04:00
Pavel Emelyanov
fc7071d05e net: Packet sockets basic support
Support only basic packet socket functionality -- create and bind.
This should be enough to start testing dhclient inside container.
Other stuff (filter, mmaps, fanouts, etc.) will come later.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 16:17:41 +04:00
Pavel Emelyanov
b1b0a39a58 pb: Rewrite object reading to use pb-descs
The pb_read thing is no longer a macros. This will allow to
factor out objects collecting on restore.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-07 19:22:00 +04:00
Pavel Emelyanov
2398c55e41 pb: Rewrite object writing to use pb-descs
The pb_write thing is no longer a macros.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-07 19:21:59 +04:00
Pavel Emelyanov
da409cc641 signalfd: Dumping and restoring
Only the fact of the fd presence, its flags and fown and the sigmask.
The sigpending state is tightly coupled with the task's sigpending
state which is not yet supported.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 12:26:35 +04:00
Pavel Emelyanov
a6439860cd net: Routes dump and restore
Same here -- run ip tool and that's it.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 08:31:46 +04:00
Pavel Emelyanov
fc1eb96783 netns: Ifaddrs dump and restore
Just run the ip addr save and ip addr restore respectively.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 08:26:43 +04:00
Pavel Emelyanov
4943eb43fd netns: Basic link dump, restore and show
Only support the lo device. This is not final yet (much more
stuff is to be handled for a link) but is rather a skeleton
showing how to do it and letting us check the LXC container
early.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 08:17:27 +04:00
Pavel Emelyanov
38431fb161 img: Introduce the notion of a raw image
Raw images are supposed to be files with non-crtools contents.
E.g. tarballs with tmpfs contents or iptables-save output. Another
example is -- ip tool addr and route dumps we're about to merge
soon.

Having these type of images allows to use the open_image and the
cr_fdset engine easily.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 07:42:41 +04:00
Pavel Emelyanov
9f2168a4f0 images: Introduce the top-level file -- inventory
Currently we store the images version in the core file. This is
bad, since core file describes a single process (or thread) and
says nothing about the images set as a whole (let alone the fact
that it's being parsed too late).

Thus introduce the inventory image file which describes the image
set the way we need (want). For now the only entry in it is the
images version. In the future it can be extended.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-19 17:37:25 +04:00
Cyrill Gorcunov
ea1ce8e472 fifo: Add checkpoint restore for fifos v4
Checkpoint and restore of fifo is similar to
pipes c/r except the pipe end-points are named
file.

Because the fifo has a name we use regular files
facility for fifo path c/r.

Still there is a trick used to "open" fifo:
the opening procedure migh sleep if a fifo's peer
is not yet opened, so before doing a real open
we yield a fake open procedure (with O_RDWR flag)
which prevents us from sleeping even if peer
is not yet ready. Also we need writable fifo
end to restore data queued.

v2:
 - add open/priv members to reg_file_info
 - make open_fifo_fd to use open_fe_fd
 - comment on pipe_id
 - make sure the fifo data is not restored twice

v3:
 - drop useless fixme comment and add sane one
v4:
 - Use restore_data flag to escape data restore duplication
 - Use S_ISREG for file contents copying

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-01 17:15:48 +04:00
Pavel Emelyanov
611b97248b img: Move all the img files management code to image.c
And clean util.c and crtools.c from image manupulation code.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-28 03:12:08 +04:00