kerndat: Produce sane error messgaes

I've just occasionally tried to run criu on old openvz
kernel and the error message was looking somehow strange
to me

| Error (kerndat.c:39): Can't stat piggie: No such file or directory

Lets produce some more detailed error text.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
page-server: check that all data have been accepted

Currently criu sends data to the page server, but it doesn't get any
feedback, so it can't be sure that all data have been accepted.

This patch adds a flush command, which requires an answer from the page
server. This command is sent before disconnecting.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: add a new test case for checking vma-s with the MAP_GROWSDOWN flags

Here are two case:
* check that a vma grows after restoring
* check that a vma can be restored if its guard page was overlapped by
  another vma.

Currently criu isn't able to dump/restore this test case. Who wants to
fix this issue?

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mounts: enumirate mounts bellow specified element

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: move is_root, is_root, fsroot_mounted to the top of the file

They are trivial and these functions will be used in many places

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
page-xref: set ret to zero if PS_IO_FLUSH completed successfully

Due to this issue the server initiates closing a connection and its
socket is transfered into the TIME_WAIT state, so the second run of
page-server fails with the error "the address is already in use".

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>