2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 01:51:51 +00:00

17 Commits

Author SHA1 Message Date
Pavel Emelyanov
9fc1d6bbeb fdinfo: Make fdinfo.type be an enum
This types specifies a strict set of what is hidden behind
the fd. Thus these numbers should be in the description of
the fdinfo message.

Plus protobuf makes shure nothing else will be there.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-19 10:18:37 +04:00
Cyrill Gorcunov
0cf04ac781 protobuf: Drop old sk_opts_entry structure
We've switched to SkOptsEntry, no need to carry this
obsolete one.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-19 09:44:41 +04:00
Cyrill Gorcunov
0468355c12 protobuf: Drop fown_t type
We are ready to use FownEntry everywhere,
so drop fown_t type and clean up source code.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-19 09:39:00 +04:00
Cyrill Gorcunov
8d92c2c3b2 protobuf: Convert inet sockets to PB engine
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-19 09:33:33 +04:00
Cyrill Gorcunov
65570d9559 sockets, inet: Use inet_sk_entry as a reference in inet_sk_info
For PB transition.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-16 07:03:59 +04:00
Pavel Emelyanov
e23c9e0cda inet: Report error if inet socket collect failed
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-10 12:56:54 +04:00
Cyrill Gorcunov
37131e51b1 sockets: Restore unbound inet sockets v5
v2:
 - Use do_dump_opt in dump_socket to not call
   lookup_socket redundantly

v3:
 - use getsockopt to check that unconnected
   socket has no peername and it's not listening
 - do test only socket protocol since family and
   type will be called in dump_one_inet_fd.

v4:
 - Move proto tests to can_dump_inet_sk
 - Use SOL_TCP/TCP_INFO to gather info about tcp sockets

v5:
 - hash unconnected sockets to run BUG_ON(already-dumped) logic
 - no default value for sk->wqlen, use zero from xzalloc
 - drop bogus xfree on error

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-01 14:42:42 +04:00
Cyrill Gorcunov
424a4adb6f sockets, inet: Use general machnism for checkpoint/restore v2
Use fdtype_ops facility to c/r inet sockets.

v2:
 - Use BUG_ON if socket is attempted to be dumped
   several times

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-30 12:56:04 +04:00
Stanislav Kinsbursky
41195598cf parasite: remove excessive header deps from parasite.h and friends
The task is not complete - this is just a part of what have to be done. I.e.
looks like a lot of excessive deps can be fixed.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-30 12:50:18 +04:00
Pavel Emelyanov
33051cd3b3 sockopt: Add basic options dump/restore
Only snd and rcv bufs and timeouts. Just as an example, others will be adder
sequentially.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-10 14:29:57 +04:00
Pavel Emelyanov
7f82ae1133 sockets: Prepare for dumping/restoring/showing socket options
Those sitting on the SOL_SOCKET level are common to different
socket families and will be handled in a generic code.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-10 14:29:57 +04:00
Pavel Emelyanov
a604c63cdb restore: Move type from file_desc to file_desc_ops
This saves some space on dynamic file_desc and makes file_desc_ops
looks closer to fdinfo_ops used on dump.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-04 15:41:05 +04:00
Pavel Emelyanov
675b4698ce tcp: Put connection locking management over the code
When dump finished with error we should unlock all locked
previously connections.

When restoring we should collect connctions and unlock them
all at the end.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-28 17:59:21 +04:00
Pavel Emelyanov
051b0a1f02 tcp: Prepare sk-inet for dumping and restoring tcp connections
First of all -- to make crtools dump/restore established tcp sockets
you have to specify the --tcp-established options. By doing so you
inform crtools that

a) you know, that after dump there will be a netfilter rules blocking
   the dumped connections

b) you guarantee, that before restore this netfilter block is still
   there

What else this patch does is simple -- collects establised sockets and
calls the dump/restore tcp function (now empty) where appropriate.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-28 17:59:21 +04:00
Pavel Emelyanov
a915a4622d inet: Move inet sk cpt and rst structs to header
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-28 17:59:20 +04:00
Pavel Emelyanov
65e48c41b1 inet: Introduce helpers for binding and connecting inet socket on restore
Just a codemove.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-28 17:59:20 +04:00
Pavel Emelyanov
518361dcaa sk: Move inet socket code to separate file
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-26 15:30:31 +04:00