2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00
Commit Graph

7555 Commits

Author SHA1 Message Date
Andrei Vagin
e7f03fbae1 inet: dump source and destination addresses for closed sockets
If a socket has been closed, it still has both addresses and
we need to dump them.

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:49 +03:00
Andrei Vagin
6e68374369 soccr: add support for syn-sent sockets
For that we restore all sockets properties and then
disable the repair mode before calling connect() and
the kernel will sent a syn packet and move the socket
into the sys-sent state.

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:49 +03:00
Andrei Vagin
b1751244aa soccr: add support for half-closed sockets
A socket is in one of half-closed states, if it sent a fin packet
or it received a fin packet.

CRIU plays with fin packets to restore half-closed states too.

When we need to sent a fin packet from a socket, we can call
shutdown(SHUT_WR). When a fin packet has to be restore in
a received queue, criu generate a fin packet and send it via
a raw ip socket.

A raw packet is sent with the SOCCR_MARK mark to be able
to not block it.

v2: remove the SOCCR_FLAGS_ACKED_FIN flag
    introduce sets of bits for different actions with fin packets

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:48 +03:00
Andrei Vagin
fd2995cc5b soccr: move connect from criu to soccr
We will need to disable the repair mode before connect()
to restore syn-sent sockets. And even now connect() looks
like a part of internal logic of libsoccr.

travis-ci: success for series starting with [01/21] build: install libnet-dev
v2: remove libsoccr_set_sk_data_unbound() from soccr.h
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:48 +03:00
Andrei Vagin
cdc6f4c107 soccr: add source and destination addresses to libsoccr_sk_data
These addresses will be used to restore half-closed sockets,
we will need to send a fake fin packet for that.

And in the next patch connect() will be moved into soccr.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:48 +03:00
Andrei Vagin
a73eb5300d soccr: add prefixes for log messages and print errno
loge() will start a message with "Error:" and
logd() will start a message with "Debug:".
logerr() will add strerror(errno) to the end of messages.

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:48 +03:00
Andrei Vagin
cb7948d9ef inet: dump actual states of tcp sockets
We get sockets from task_diag, then we block network and dump sockets.

A socket state can be changed between first two steps, so lets get
a socket state on the third step and dump it.

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:48 +03:00
Andrei Vagin
beb57e9524 make: add deps for libsoccr
Without this patch when we change libsoccr, criu isn't rebuilt.

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:48 +03:00
Andrei Vagin
d9d3dc7a09 criu: check whether tcp_repair can be enabled for half-closed sockets
Originally the repair mode could be enable only for sockets
in closed and established states. Starting with the 4.10 kernel,
it is possible to enable the repair mode for all connected sockets
and now we can dump syn-sent and half closed sockets.

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:46 +03:00
Andrei Vagin
aec9eb921f build: install libnet-dev
It will be used to generate tcp packets for restoring half-closed sockets.

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:43 +03:00
Adrian Reber
6d07a4f95b soccr: add '\n' to all loge/logd
Some of the loge messages where missing a '\n'. For consistency this
adds '\n' to all messages which were missing it.

travis-ci: success for libsoccr debug/info messages (rev2)
Signed-off-by: Adrian Reber <areber@redhat.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Dmitry Safonov
c8729c220d criu: enable soccr logging
Initialize logging function and log_level for libsoccr.
Otherwise all soccr messages are skipped.

travis-ci: success for libsoccr debug/info messages
Reported-by: Adrian Reber <adrian@lisas.de>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Tycho Andersen
d0762eff04 build: only generate soccr config.h if necessary
Without this, any rebuild fails with:

make[1]: Entering directory '/home/ubuntu/criu'
make[1]: Entering directory '/home/ubuntu/criu'
  GEN      .gitid
  GEN      criu/include/config.h
  GEN      /home/ubuntu/criu/criu/include/version.h
make[1]: 'compel/plugins/std.built-in.o' is up to date.
make[1]: Leaving directory '/home/ubuntu/criu'
ln: failed to create symbolic link '/home/ubuntu/criu/soccr/config.h': File exists
Makefile:217: recipe for target '/home/ubuntu/criu/soccr/config.h' failed
make: *** [/home/ubuntu/criu/soccr/config.h] Error 1
make: *** Waiting for unfinished jobs....
make[1]: Entering directory '/home/ubuntu/criu'
make[1]: 'compel/compel-host' is up to date.
make[1]: Leaving directory '/home/ubuntu/criu'
make[1]: Leaving directory '/home/ubuntu/criu'

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Cyrill Gorcunov
207bbd891f soccr: Generate config.h dynamically
Otherwise there is a broken symlink which makes tags/etags unhappy.

travis-ci: success for soccr: Generate config.h dynamically (rev5)
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
[extended .gitignore, maked link relative to sources]
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Dmitry Safonov
f92b8d9c44 soccr: rectify Alpine build
Made a symlink to CRIU's generated config.h, played with
moving some code to soccr.h header.
Changed types from u32 to uint32_t, otherwise we should
include CRIU's "int.h" in soccr, but I'm lazy to add that.

Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Pavel Emelyanov
51e301571a soccr: Add soccr.h's comments
TODO: Write proper man page/doc.
TODO: Document that the library spoils the reuseaddrs option on socket.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Pavel Emelyanov
c5de18a399 soccr: Handle connection state
For now we only support ESTABLISHED state, so this is mostly
a preparation for the future extention.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Pavel Emelyanov
cab3f17645 soccr/tcp: Restore queues using library
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Pavel Emelyanov
826a86e496 soccr/tcp: Restore socket's info after binding it
With window parameters, we have stuff to restore before
queues and after queues.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Pavel Emelyanov
611dc707e2 soccr/tcp: Restore socket's info before binding it
In TCP repair some stuff should be restored before calling
connect/bind on socker and some -- after it.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Pavel Emelyanov
efdcf3776a soccr/tcp: Prepare connection info for restore
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Pavel Emelyanov
c08eb3dde1 soccr/tcp: Read queues contents using library
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Pavel Emelyanov
d98c0ea67c soccr/tcp: Fill actual connection info using the library
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:42 +03:00
Pavel Emelyanov
4fdc20ed40 soccr/tcp: Introduce blob with connection info and getter for it
As an API for dumping and restoring the data the structure
with __u32-s is used. Getting one (and restoring) also involve
the size of the structure so that both -- caller and library --
can know which "version" of it the other one is using.

As a starting point all the fields that tcp_entry carries are
used.

Also note, that only tcp connection info is handled by the
library. Stuff like addresses and ports, socket options and
other are left for the caller to care for.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:41 +03:00
Pavel Emelyanov
b8b113bf56 soccr/tcp: Add _pause and _resume to library and use it
The calls put socket into a mode where it can be saved or
restored. Add take one out of this mode.

TODO: In criu we turn repair off (resume the socket) from
restorer blob that cannot use the library. Need to somehow
fix it.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:41 +03:00
Pavel Emelyanov
e3f270ac05 soccr: Add logging
In order to get messages from libsoccr I propose to
introduce a printing callback that can be set by library
user and that will be called by libsoccr.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:41 +03:00
Pavel Emelyanov
6d9e6d15bf soccr: Wire into builder
For now build the .a library not to produce criu wrappers.
Next version should include the .so library as well.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:41 +03:00
Kirill Tkhai
741719e8d3 ns: Fix error return value in __get_ns_id()
Function has unsigned int return value, and error is coded by 0, not -1.

travis-ci: success for ns: Fix error return value in __get_ns_id()
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:30:07 +03:00
Dmitry Safonov
8cae4bdcfa zdtm/test: add infop to waitid()
The man page says, it's not optional argument:
  The application shall ensure that the infop argument
  points to a siginfo_t structure.

Fixes:
Test output: ================================
17:40:26.128:     5: FAIL: helper_zombie_child.c:33: waitid (errno = 14 (Bad address))
17:40:26.128:     4: FAIL: helper_zombie_child.c:78: read (errno = 2 (No such file or directory))
17:40:26.129:     3: ERR: test.c:229: Test exited unexpectedly with code 1

Test output: ================================
15:30:49.021:    30: ERR: sigpending.c:213: waitid (errno = 14 (Bad address))
15:30:49.021:    29: ERR: test.c:229: Test exited unexpectedly with code 1

and etc.

travis-ci: success for 32-bit tests fixes
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:30:06 +03:00
Vitaly Ostrosablin
ae48b5d676 test: add variable delta for poll.c test
For ZDTM purposes, poll.c uses delta of 5 seconds, which is fine, since
tests don't take a very long time to pass. However, in vzt-cpt, we start
a batch with multitude of tests and starting them all could take over an
hour. Hence, the test is bound to fail. An easy solution would be to
introduce an environment variable, which would allow to specify the
delta - ZDTM_DELTA. If it's unset (which is default behaviour in ZDTM) -
it would default to 5 seconds. However, if it's set (what we can do from
vzt-cpt) - then it will use delta which is set by our test.

travis-ci: success for test: add variable delta for poll.c test (rev2)
Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:30:06 +03:00
Andrei Vagin
1418492fd2 files: don't leak a file descriptor
CID 173737 (#1 of 2): Resource leak (RESOURCE_LEAK)
9. leaked_handle: Handle variable rmntns_root going out of scope leaks the handle.

travis-ci: success for files: don't leak a file descriptor
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:30:06 +03:00
Pavel Emelyanov
a99b7c1ba3 page-server: Allow blocking on socket
When splicing page server data from UNIX socket we may get
error (EAGAIN) from splice if no data is available on the
socket yet. This is because the SPLICE_F_NONBLOCK flag is
checked by af_unix.c in the kernel to decide whether or
not to do blocking read.

This is not symmetrical with TCP sockets, which only check
for the socket's O_NONBLOCK flag for the same decicion.

Dropping the SPLICE_F_NONBLOCK flag is not possible too, as
otherwise we'll block on the pipe when trying to put data
into it. Even if part of the data fits into it kernel would
block anyway untill full buffer is in. And there will be
no read() from the pipe, as it should happen one step later
in the same task.

So to untie this, we need to wait for the data explicitly
with poll().

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:30:06 +03:00
Andrei Vagin
aabeb8e46d zdtm: use a unix socket instead of a pipe to synchronizer processes
A unix socket can be bound to itself, so we need only one socket
instead of a pair of pipe.

If we use a socket, we can peek a message and if it isn't for us
we don't need to send it back.

Currently a process reads message from pipe, if it isn't for him,
it sends it back and sleeps for a random timeout. In a worst case
each waiter will read and send a message back, before the right
one will get it.

travis-ci: success for series starting with [1/3] zdtm: call test_init() before doing anything
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:30:06 +03:00
Andrei Vagin
f5df0adac6 travis: build tests in docker containers
travis-ci: success for series starting with [1/3] zdtm: call test_init() before doing anything
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:30:05 +03:00
Andrei Vagin
4c3068cfca zdtm: call test_init() before doing anything
test_init() has to be executed first, because it prepares a container.

travis-ci: success for series starting with [1/3] zdtm: call test_init() before doing anything
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:29:29 +03:00
Cyrill Gorcunov
02cdd46dd3 rst-malloc: Update deprecated MAP_ANON flag
travis-ci: success for Fetch mmap_minimal_address and drop MAP_ANON
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:29:29 +03:00
Cyrill Gorcunov
1296fff7db restore: Fetch mmap_minimal_address runtime
We assume that mmap_minimal_address with non-default
setting is not widespread but it's not true. Instead
lets fetch this setting runtime.

travis-ci: success for Fetch mmap_minimal_address and drop MAP_ANON
Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:29:28 +03:00
Gleb Valin
7a6b96aed7 zdtm: Add test for SOCK_PACKET sockets
This one covers the following cases:
* socket is bound to an interface
* socket isn't bound to an interface

https://github.com/xemul/criu/issues/73
travis-ci: success for series starting with [1/2] socket: Add support for SOCK_PACKET sockets
Signed-off-by: Gleb Valin <the7winds@yandex.ru>
Signed-off-by: Eugene Batalov <eabatalov89@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:28:43 +03:00
Gleb Valin
6d86d8d0d1 socket: Add support for SOCK_PACKET sockets
If socket type is SOCK_PACKET it restores binding with proper address structure.

https://github.com/xemul/criu/issues/73
travis-ci: success for series starting with [1/2] socket: Add support for SOCK_PACKET sockets
Signed-off-by: Gleb Valin <the7winds@yandex.ru>
Signed-off-by: Eugene Batalov <eabatalov89@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:28:43 +03:00
Vitaly Ostrosablin
b82fc5e07c test: fix shell script tests (conntracks & route_rules)
Test seem to assume that zdtm lib directory is on PATH, but if it's not
- calling for parseargs.sh would fail (if cwd is static). Therefore,
this patch changes this to ../lib/parseargs.sh which should be fine both
for zdtm and vzt-cpt.

travis-ci: success for test: fix shell script tests (conntracks & route_rules)
Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:28:43 +03:00
Adrian Reber
9a5ff1a075 zdtm: fix '"makedev" is defined by <sys/sysmacros.h>'
Compiling zdtm on the latest Fedora rawhide gives errors like this:

ns.c: In function ‘prepare_mntns’:
ns.c:122:13: error: In the GNU C Library, "makedev" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "makedev", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "makedev", you should undefine it after including <sys/types.h>. [-Werror]
   if (mknod("/dev/ptmx", 0666 | S_IFCHR, makedev(5, 2)) == 0) {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

This commit fixes those errors.

travis-ci: success for zdtm: fix '"makedev" is defined by <sys/sysmacros.h>'
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:28:43 +03:00
Pavel Emelyanov
aa1d24a76f util: Do not leak dup-ed file descriptor
When going daemon criu services ask cr_daemon() to keep
some descriptors open and the routine dup2-s them. The
problem is that the original descriptor is left where it
was and is leaked.

travis-ci: success for util: Do not leak dup-ed file descriptor
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:28:43 +03:00
Andrei Vagin
879d6d1e03 test: check non-root shared mounts
The idea of this test is to check non-root shared mounts
which lives in a few shared groups.

v2: fix the link description.

travis-ci: success for test: check non-root shared mounts (rev2)
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:28:43 +03:00
Pavel Emelyanov
a48c533536 page-read: Fix maybe_read_page to accept nr
Most of the rest code uses int nr, so ...

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2016-12-22 17:44:32 +03:00
Mike Rapoport
215d242ad9 pagemap: drop pagemap2iovec and iovec2pagemap
The PagemapEntry and struct iovec are quite interchangeable.
PagemapEntry can be used directly in the few places that converted it to
struct iovec.
The only place that used iovec2pagemap can be switched to open-coded
assignments without really hurting code readability.

travis-ci: success for pagemap: minor cleanups (rev2)
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-22 15:06:55 +03:00
Mike Rapoport
094ba506fe dedup_one_iovec: explicitly pass start and end instead of iovec
travis-ci: success for pagemap: minor cleanups (rev2)
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-22 15:06:55 +03:00
Pavel Emelyanov
4a7947aa79 page-read: Don't let pr->pe remain NULL
CID 172196, issues/233.

The advance method can keep pr->pe NULL while the rest of
the code doesn't count on that.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2016-12-22 15:06:55 +03:00
Pavel Emelyanov
5d8e80d607 page-read: Remove get_pagemap method
Now it's obsoleted by the advance method.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2016-12-22 15:06:55 +03:00
Pavel Emelyanov
84f22ae101 page-read: Remove iov from get_pagemap
We have pr->pe with the same data available widely, no need
to copy this thing twice.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2016-12-22 15:06:54 +03:00
Mike Rapoport
75b4aae5dc pagemap: replace seek_page with seek_pagemap method
The only external users of ->seek_page method are page-xfer and uffd and
both of them are anyway interested in the entire pagemap rather than a
particular page.
The added 'skip_zero' parameter allows proper detection of zero pagemaps by
uffd.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-22 15:06:54 +03:00