2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

5765 Commits

Author SHA1 Message Date
Andrew Vagin
a1457a7b73 sysctl: restore sysctls for correct namespaces
When we don't use userns, __userns_sysctl_op is called
in context of the current process. A mount namespaces is restored
the last one, so when we restore namespaces, we see /proc from the
host pid namespace. In this case we can't use virtual pid to access
/proc/pid.

Let's open /proc/self/ns and use this descriptor to switch namespaces.

Cc: Tycho Andersen <tycho.andersen@canonical.com>
Fixes: f79f4546cfc0 ("sysctl: move sysctl calls to usernsd")
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-09 18:25:35 +03:00
Adrian Reber
23573119bd Introduce feature check via RPC
There are still systems which do not support dirty memory tracking.
This offers an interface to query the dirty memory tracking availability
via the new feature check RPC.

This is in preparation of a p.haul change which will use this RPC
interface to automatically detect if pre-dumps should be executed
or not.

This change introduces an additional optional field in the
criu_request and criu_response message (features) which is a
'criu_features' message.

Right now only the check for the memory tracking feature is supported
in the message 'criu_features':
	optional bool                   mem_track       = 1;

v2: Instead of checking for memory tracking only, provide a generic
    interface to check for arbitrary features.

v3: Do not use bitfields for feature encoding but protobuf optional
    message parameters.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-09 18:25:00 +03:00
Matthew Krafczyk
29c08d8672 Add pre-dump and pre-restore action scripts
This allows the user to perform actions before dumping or restoration
occurs.

Signed-off-by: Matthew Krafczyk <krafczyk.matthew@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-09 18:23:41 +03:00
Salvatore Bonaccorso
400b35b449 pycriu: Make build reproducible
Chris Lamb <lamby@debian.org> reported in Debian that criu is not
building reproducible while working on the "reproducible builds" effort
[0].

 [0] https://wiki.debian.org/ReproducibleBuilds
 [1] https://bugs.debian.org/801211

Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-08 13:27:32 +03:00
Andrew Vagin
d9b1b9ff37 restore: fix checking error code of sys_sigaction
sys_sigaction() returns an error code

Reported-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-08 13:19:33 +03:00
Cyrill Gorcunov
002c81c3ce mnt: Don't treat ns roots as special when restoring
Namespace roots might be slave ones from another
namespace roots, so we should not treat them as
"always ready" for mounting but rely on general
logic in can_mount_now which tests slaves relations.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-08 13:18:47 +03:00
Cyrill Gorcunov
90eae6a168 sk-unix: Don't affect cwd for relative named sockets
When we restore sockets with relative names we change
current working directory into the one provided by
socket image data. This actually affects current
criu state because the rest of code doesn't know
about such tricks and may rely on working dir
consistency.

So remember the current working dir and restore it
back once socket cwd operations are complete.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-08 13:18:10 +03:00
Tycho Andersen
3b02df57ef util: don't chop off last element in buffer
377763e5 is incorrect since we can't always chop off the last element in
the buffer:

Execute static/cgroup00
./cgroup00 --pidfile=cgroup00.pid --outfile=cgroup00.out --dirname=cgroup00.test
Dump 12819
(00.003514) Error (files-reg.c:624): Can't create link remap for /dev/nul. Use link-remap option.
(00.003523) Error (cr-dump.c:1257): Dump files (pid: 12819) failed with -1
(00.004042) Error (cr-dump.c:1619): Dumping FAILED.
WARNING: cgroup00 returned 1 and left running for debug needs
Test: zdtm/live/static/cgroup00, Result: FAIL
==================================== ERROR ====================================
Test: zdtm/live/static/cgroup00, Namespace:
================================= ERROR OVER =================================

Hopefully the >= will appease coverity (instead of just a ==).

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 15:53:42 +03:00
Adrian Reber
ff3f52d244 Fix two comment typos
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 15:19:16 +03:00
Cyrill Gorcunov
5b203c1e1b mnt: Make sure we don't hit nil dereference on nested mount
Such case is actually a BUG but while we can resolve
the situation without real bug-on call lets walk in
a gentle way.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 15:18:47 +03:00
Cyrill Gorcunov
09d97050aa mnt: Add info about mnt image we're reading
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 15:17:26 +03:00
Cyrill Gorcunov
9e1da526e6 mnt: Add more details in pr_debug for shared, slaves binds
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 15:17:21 +03:00
Andrei Vagin
896752471f zdtm: don't exclude ipc and uts namespaces in case of userns
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 15:16:50 +03:00
Andrew Vagin
c7bc365530 sysctl: add the "fallthrough" annotation
CID 152112 (#1 of 1): Missing break in switch (MISSING_BREAK)
unterminated_case: The case for value 4 is not terminated by a 'break' statement.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 15:16:03 +03:00
Kir Kolyshkin
928db333a8 parse_pid_stat(): minor optimization
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:58:14 +03:00
Kir Kolyshkin
faf07489f2 check_path_remap(): fix error checks
Naturally, checking strstr()+1 for NULL is useless.

Reported by Coverity, CID 51594.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:58:03 +03:00
Kir Kolyshkin
e5654e586c Use strlcpy
It's better to

1. Use strlcpy() instead of strncpy() as otherwise we might end up
   with a not NULL-terminated string, which opens a portal to hell.
   There are a few places reported by Coverity for this, such as:
    - in criu_connect(), Coverity CID 51591;
    - in proc_pid_parse(), Coverity CID 51590;
    - in move_veth_to_bridge(), Coverity CID 51593;
    - etc.

2. Use strlcpy() instead of strcpy() to avoid buffer overruns.
   Some of these are also reported by Coverity, for example
   the one in dump_filemap(), Coverity CID 51630.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:57:28 +03:00
Kir Kolyshkin
bf607a6ea8 sysctl_op(): fix check for known ns mask
This must be boolean not logical NOT.

Reported by Coverity, CID 114612.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:57:09 +03:00
Kir Kolyshkin
7073009b5d __userns_sysctl_op(): fix a check
This is obviously a copy-paste typo.

Reported by Coverity, CID 114615.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:57:02 +03:00
Kir Kolyshkin
250c89edde read_ns_sys_file(): check if buf is long enough
In case buf size is not adequate, report and return an error.
This is modelled after commit 1ead3d7.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:56:55 +03:00
Kir Kolyshkin
ec863205f4 read_ns_sys_file(): don't overrun buf
This is a classical off-by-one error. If sizeof(buf) is 512,
the last element is buf[511] but not buf[512].

Note that if read() returns 0, we return 0 but buf stays
uninitialized.

Reported by Coverity, CID 114623.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:56:42 +03:00
Kir Kolyshkin
377763e5b1 read_fd_link(): don't overrun buf
This is a classical off-by-one error. If sizeof(buf) is 512,
the last element is buf[511] but not buf[512].

Reported by Coverity, CID 114624, 114622 etc.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:56:33 +03:00
Laurent Dufour
0570dd81d6 ppc64: handle gcc memcpy optimisation
The commit 871da9a11147 ("pie: Give VDSO symbol table local scope")
move the definition of the vdso_symbols from global to local variable
in vdso_fill_symtable(). This makes sense since this variable is only
used in this function. However this raises a build issue on powerPC,
where a memcpy undefined symbol is detected when doing the first
relocation phase of the parasite code:

parasite_blob: Error (pie/piegen/elf.c:258): Unexpected undefined
symbol:memcpy

This memcpy symbol is pulled by the C compiler generated code which
tries to optimize the stack initialization when entering
vdso_fill_symtable(). The optimization is done by copying the
initialized data to the stack using memcpy. But when building the
parasite code, the C library is not linked and there is no memcpy
symbol. However there is builtin_memcpy() which is doing the same.

Ideally, the builtin_memcpy should be named memcpy() to replace the C
library one, and it should only be built for the parasite/restorer
code. But the way CRIU is built, the same vdso-util.o file is used
twice for criu which is linked with the C library and by the
parasite/restorer code. Thus naming builtin_memcpy memcpy leads to
belongs on builtin_memcpy even when the C library is in the picture,
which is not the best option (assuming C library mem operation are
more efficient).

Among the memcpy symbol issue, this shows that same objects are used
both in CRIU and the parasite/restorer code. This should not be the
case since parasite/restorer are built in pie form and criu's object
not. The shared code should be built twice, once on pie form for the
parasite/restorer code, once *normally* for the criu binary.

Addressing the build issue implies more work than expected.
For the moment, this patch is defining a memcpy service when building
the parasite code to fix the build issue on ppc64.
Once the build issue is addressed, builtin_memcpy should be renamed
memcpy and only be used for parasite/restorer code, and this
definition removed.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:51:23 +03:00
Pavel Emelyanov
6b83934e33 zdtm: Move towards the new generation of criu testing (v3)
A little bit more stuff added :) With these changes I can run the

  zdtm.py run --all -x cgroup -x maps04 -x different_creds -x rtc

To run cgroups tests need to add .hook calls, for maps04 I don't have
enough RAM and disk in my VM (will fix), for different_creds need to
support crfail test option (dump _must_ fail), for rtc -- plugins.

So changes since v2:

1. Added exclusion (-x option)
2. Bugfix in parallel run
3. Fixed NS root permissions
4. Fixed checks for maps before and after dump
5. Fixed thread_bomb launch
6. Print test output
7. Support .checkskip scripts
8. Support features
9. Fixed test list

Andrey, thoughts?

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@openvz.org>
2015-10-07 14:50:53 +03:00
Andrey Vagin
9a3ae4aba1 fsnotify: print an error if a file can't be opened
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:50:08 +03:00
Andrey Vagin
e23299b45a mount: use absolute paths for pivot_root
When we initialize a sub-mount namespace, we need to use absolute paths.
For example we change cwd in prep_unix_sk_cwd()

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-07 14:49:31 +03:00
Andrew Vagin
fd8e58841a restore: block SIGCHILD for sub-processes (v2)
Otherwise sigchld_handler() will call waitpid()
and worries about unknown process.

(00.333012)      1: kernel/hostname nr 15
(00.333120)      1: kernel/domainname nr 6
(00.335243)      1: Error (cr-restore.c:1225): BUG at cr-restore.c:1225

v2: don't use unitialized oldmask

Cc: Tycho Andersen <tycho.andersen@canonical.com>
Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 19:41:33 +03:00
Cyrill Gorcunov
6a51c7eca9 make: Allow to install in custom dirs
There is no way to redefine install paths into
some custom ones (say plain /usr). Fix it by
using conditional inits.

Reported-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:24:23 +03:00
Christopher Covington
871da9a111 pie: Give VDSO symbol table local scope
In commit c2271198, Laurent Dufour kindly reunified the VDSO code
that had become duplicated between architectures. Unfortunately
this introduced a regression in AArch64 where apparently due to
the scope of vdso_symbols array of pointers to characters changing
from local to global, load-time relocations became necessary.

The following thread on the GCC mailing list discusses why
load-time relocations can be necessary when pointers are used,
although it doesn't mention the potential for locally scoped
arrays to be handled differently:
https://gcc.gnu.org/ml/gcc/2004-05/msg01016.html

Because the alternatives, such as porting piegen to AArch64, are
far more involved, simply revert the change in scope.

Signed-off-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:21:16 +03:00
Christopher Covington
627f9a9e5f aarch64: Fix write_intraprocedure_branch types
In the recent VDSO code reunification, some types were changed but
a pair of necessary corresponding changes was omitted. Fix that so
the AArch64 build succeeds without type-related
warnings-turned-errors. Also move the definition to the
AArch64-specific header since it's not currently being used by any
other architectures.

Signed-off-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:20:01 +03:00
Tycho Andersen
17d9c0f713 cgroup: move tasks into cgroup via usernsd
Tasks in a user namespace cannot write themselves into cgroup tasks files,

(00.845068)      1: Error (cgroup.c:901): cg: Can't move into blkio/lxc/unpriv/tasks (-1/-1): Permission denied

So, let's write them into the tasks via usernsd.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:18:56 +03:00
Tycho Andersen
f79f4546cf sysctl: move sysctl calls to usernsd
When in a userns, tasks can't write to certain sysctl files:

(00.009653)      1: Error (sysctl.c:142): Can't open sysctl kernel/hostname: Permission denied

See inline comments for details on affected namespaces.

Mostly for my own education in what is required to port something to be
userns restorable, I ported the sysctl stuff. A potential concern for this
patch is that copying structures with pointers around is kind of gory. I
did it ad-hoc here, but it may be worth inventing some mechanisms to make
it easier, although I'm not sure what exactly that would look like
(potentially re-using some of the protobuf bits; I'll investigate this more
if it looks helpful when doing the cgroup user namespaces port?).

Another issue is that there is not a great way to return non-fd stuff in
memory right now from userns_call; one of the little hacks in this code
would be "simplified" if we invented a way to do this.

v2: coalesce the individual struct sysctl_req requests into one big
    sysctl_userns_req that is in a contiguous region of memory so that we
    can pass it via userns_call. Hopefully nobody finds my little ascii
    diagram too offensive :)
v3: use the fork/setns trick to change the syctl values in the right ns for
    IPC/UTS nses; see inline comment for details
v4: only use sysctl_userns_req when actually doing a userns_call.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:16:14 +03:00
Andrew Vagin
6d52d6ee21 zdtm: check a test result for static/different_creds
CRIU should not affect process states when it can't dump them.

Cc: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:13:21 +03:00
Andrew Vagin
16923109c6 ptrace: don't stop a process if it was not in the stopped state (v2)
v2: fix one more place

Reported-by: Pavel Emelyanov <xemul@parallels.com>
Cc: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:12:48 +03:00
Andrew Vagin
a973e6fcb3 net: dump ipv6 routes
"ip route dump" dumps only ipv4 routes.

Reported-by: Ross Boucher <boucher@gmail.com>
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:11:31 +03:00
Cyrill Gorcunov
3ffad59e2e piegen: Allow to compile piegen tool in cross environment
To build piegen tool with different compiler/linker than
gcc/ld -- simply run make as

	HOSTCC="host-compiler" HOSTLD="host-ld" make

where host-compiler/ld is appropriate program needed.

https://github.com/xemul/criu/issues/63

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:09:33 +03:00
Cyrill Gorcunov
a755ece2f0 piegen: Use shorthand for target
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-05 13:09:21 +03:00
Cyrill Gorcunov
0516001f91 restore: Report error if write into last pid failed
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-30 12:32:03 +03:00
Pavel Emelyanov
80b66ee15d mnt: Don't include fake root entry in every mnt tree
This entry is only required if we have it, i.e. -- at restore stage
in the tree we _built_. All other cases, in particular, local tree
collection on restore, do not need such.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@odin.com>
2015-09-30 12:31:32 +03:00
Pavel Emelyanov
e55236f586 ghost: Fix off-by-one when printing ghost path
The rfi->path doesn't contain the leading /, neither does the ghost->rpath,
so when attaching it to root don't forget to include one there.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@odin.com>
2015-09-30 12:31:25 +03:00
Tycho Andersen
97cb181cbc irmap: don't leak irmap objects in --irmap-scan-path
v2: use struct irmap directly in irmap_path_opt

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-28 22:02:51 +03:00
Andrey Vagin
6c62aa8a35 page-server: wait when a socket will be closed only if it isn't external
External socket can be used for other purpose.

Reported-by: Adrian Reber <adrian@lisas.de>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Adrian Reber <adrian@lisas.de>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-28 22:02:18 +03:00
Andrew Vagin
baed9dd946 zdtm: check restoring of sockets in the TCP_CLOSE state
(00.004456) Error (sk-inet.c:188): Name resolved on unconnected socket
(00.004466) Error (cr-dump.c:1255): Dump files (pid: 7944) failed with -1
(00.004680) Error (cr-dump.c:1617): Dumping FAILED.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-28 22:01:36 +03:00
Pavel Emelyanov
ee6fbf7c2f inet: Check for supported protocol earlier
If we try to dump inet socket with unsupported proto we may fail
with strange error from get_unconn_sk(), since the socket will
not be found in hashes.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Reported-by: Julian Andres Klode <jak@jak-linux.org>
2015-09-28 22:01:13 +03:00
Pavel Emelyanov
efa7dcf7c2 ghost: Remove ghost files if restore fails
Issue #18. When restore fails ghost files remain there. And
to remove them we have to know their list, paths to original
files (to construct the ghost name) and the namespace ghost
lives in.

For the latter we keep the restore task namespace at hands
till the final stage and setns into it to kill ghosts.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-28 22:00:37 +03:00
Pavel Emelyanov
a7c9f3011d mnt: Read mount images early
Mappings from mount id to namespace will be required to
remove ghosts on restore failure.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-28 22:00:36 +03:00
Pavel Emelyanov
b0e23c3d4f files: Collect ghosts and regilfes early
Info about ghosts presence and paths will be needed to
remove the ghosts itself and thus are needed in criu.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-28 22:00:35 +03:00
Pavel Emelyanov
4f7c8af0cb remaps: Move code into helper and rename global list
This list is used to roll-back the link remap files on dump. I
plan to re-use it to roll-back ghost files on restore, so clean
the code a little bit towards this change.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-28 22:00:14 +03:00
Pavel Emelyanov
152222a6b7 remap: Sanitize ghost file path printing
First -- avoid two memory copies by printing ns root directly, and
second -- remove extra argument from create_ghost, the mnt_id value
we need there can be found on the ghost_file object.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-28 21:59:45 +03:00
Pavel Emelyanov
6cf77f6726 remap: Rename fields for easier grep
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-09-28 21:58:28 +03:00