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

9 Commits

Author SHA1 Message Date
Cyrill Gorcunov
8f64a14a03 headers: Move fcntl related data to include/fcntl.h
fcntl data is arch independent, so move it out of include/asm/type.h

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-14 22:13:10 +04:00
Alexander Kartashov
cb9094d810 page-pipe: fixed format strings
Use the format specifier %zu instead of %lu to print a size_t integer.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-04-30 18:31:34 +04:00
Kir Kolyshkin
41c7ca8218 Fix typos in comments
This is less useful than fixing typos in output messages, but anyway.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-04-15 12:46:46 +04:00
Pavel Emelyanov
af03e7d564 page-pipe: Print full layout of page-pipe in log (in debug loglevel)
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-04-12 19:45:26 +04:00
Pavel Emelyanov
e5e537954c page-pipe: Support holes in page-pipe iov map
Holes are regions, that don't have pages in them (i.e. -- no
pages in pipes). These holes are in separate iovs array since
we should have straight arrays of iovs for non-holes, which is
in turd required to push it into vmsplice in _one_ chunk.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-04-12 19:45:07 +04:00
Andrey Vagin
055b937226 page-pipe: fix memory leak on error path
CID 996197 (#1 of 1): Resource leak (RESOURCE_LEAK)
8. leaked_storage: Variable ppb going out of scope leaks the storage it points to.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-04-05 08:21:45 +04:00
Cyrill Gorcunov
2e20b48051 page-pipe: Don't forget to free page pipe buffer itself
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-03-18 22:26:04 +04:00
Pavel Emelyanov
8801f59615 mem: Protobuf format for page dumps
Since now we drain pages out of parasite, we can invent any format for
page dumps. Let is be ... prorobuf one! :)

Another thing to keep in mind, is that we're about to use splices and
implement iterative migration, so it's better to have actual pages be
page-aligned in the image.

And -- backward compatibility. That said the new format is:

1. pagemap-... file which contains a header (currently with a ID of
   the image with pages, see below) and an array of <nr_pages:vaddr>
   pairs. The first value means "how many pages to take from the
   file with pages (see below)" and the second -- where in the task
   address space to put them. Simple.

2. pages-... file which containes only pages one by one (thus aligned
   as we want).

This patch breaks backward compatibility (old images with pages wil
be restored and then crash). Need to do it before v0.5 release.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-03-14 18:16:41 +04:00
Pavel Emelyanov
960694e96f page-pipe: Introduce object to collect pages within
The page-pipe is an object, that can accumulate pages inside it. It
consists of list of page-pipe-bufs, which in turn has a pipa, an
array of iovecs that describe the pages' locations and some stats.

Users of it are supposed to vmsplice pages into pipes to accumulate
then for later use, and vmsplice them from pipes when required.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-03-01 20:12:58 +04:00