2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-24 19:08:11 +00:00

21 Commits

Author SHA1 Message Date
Cyrill Gorcunov
318c45d4c3 inotify: Add LOG_PREFIX
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-20 15:14:57 +04:00
Pavel Emelyanov
51133437c9 fd: Remove per-filetype make_gen_id abstraction
It doesn't makemuch sense in pulling this further. The generic genid generation seems to
be enough for eny file type.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-11 22:41:29 +04:00
Pavel Emelyanov
b91445701b img: Introduce generic routine for collecting image entries
On restore we typically read an image and put the entries into
some hash/list/whatever to work on them later. It's handy to have
a generic routine for doing so.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 13:16:46 +04:00
Pavel Emelyanov
657a544fb7 pb: Rewrite object showing to use pb-descs
The pb_show things are no longer macros.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-07 19:22:02 +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
95c593a618 inotify: Sanitize inotify + inotify_wd collecting
Add fdesc at once, don't init list we're about to add
and use single fd variable.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-24 10:22:37 +04:00
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
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
Pavel Emelyanov
d6514dae45 pb: Introduce show_plain routine
This one walks the 'plain' image file, i.e. the one with straignt <magi>[<size><entry>]*
format, and prints each message. Saves lots of lines of code.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-18 19:09:51 +04:00
Stanislav Kinsbursky
656a463769 show: Convert simple array showing fns to use pb_show_msg
[merges some Stas' patches]

Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-19 08:26:25 +04:00
Cyrill Gorcunov
28638b611c protobuf: Convert inotify data to protobuf engine
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-17 07:25:42 +04:00
Pavel Emelyanov
feb6624ddf inotify: Wire into and use Generic fdinfo parsing engine
With this the code looks clearer and finally a ground for "check" code is prepared.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-11 09:35:36 +04:00
Cyrill Gorcunov
883126a475 inotify: Use embedded structures as a reference
We need it for protobuf transition.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-10 07:01:32 +04:00
Cyrill Gorcunov
18ede23c49 inotify: Tune up fdinfo format for new kernel output
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-01 15:35:54 +04:00
Andrey Vagin
066ec066a0 crtools: remove unused variables (v3)
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-18 19:01:21 +04:00
Cyrill Gorcunov
0196d30a52 eventpoll, inotify: Don't fail on watchees absence
In case if eventpoll or inotify just created but
not watchee added we should not fail.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-12 16:23:33 +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
6a55c1c596 dump: Move per-type dump opts into respective .c files
No functional changes, just a code move.

TODO:

* need to write personal make_gen_id implementations for special
files (device and pos is const for them effectively)
* need to merge dump ops with restore ones (file_desc_ops)

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-04 15:34:55 +04:00
Pavel Emelyanov
50ff1438b0 anon: Factor out checking for anon inode link types
Funny, but kernel reports some of them with []-s and some (well,
ok, inotofy only) without...

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-04 14:22:18 +04:00
Cyrill Gorcunov
bff52ba952 inotify: Add checkpoint/restore v2
v2:
 - open_mount is cleaned up
 - byte-stream hex conversion remains untouched since
   strtol is flipping numbers to LE manner

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-04 14:00:45 +04:00