Commit graph

7220 commits

Author SHA1 Message Date
Cyrill Gorcunov
524aeefdd0 criu: arch -- Fix more task_size prototype
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-13 15:49:38 +03:00
Pavel Emelyanov
8e85aed88e seize: Simplify processes_to_wait calc
Localize the processes_to_wait calculations in seize.c. In
order to distinguish dead tasks which has already been wait()-ed
from dead tasks that hasn't introduce internal 'zombie' state
for seize_wait_task().

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-13 15:49:38 +03:00
Pavel Emelyanov
5773ad84b3 seize: Simplify creds checkers
Don't do comparisons of creds insize core seizing routine. Instead,
pull the creds on the caller's stack and compare them there if
required.

At the same time more the proc_status_creds_dumpable() to the place
where it's only needed and make it static.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-13 15:49:37 +03:00
Laurent Dufour
6a1c0a071c arch: Introduce user_fpregs_struct_t on ppc64
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
[ldufour@linux.vnet.ibm.com: mostly rewrite to fix functional issue]
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-13 15:49:37 +03:00
Laurent Dufour
7925c1e115 ppc64: use vector128 type for Altivec data
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-13 15:49:37 +03:00
Pavel Emelyanov
f94c0ff7ed arch: Reintroduce user_fpregs_struct_t on x86
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
2016-10-13 15:49:36 +03:00
Pavel Emelyanov
8b248c02c9 arch: Introduce user_fpregs_struct_t on arm and aarch64
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
2016-10-13 15:48:44 +03:00
Andrei Vagin
e674a7333d scripts: allow to skip travis specific parts in travis-tests
We are going to use this script for testing linux-next.

v2: remove bashism
travis-ci: success for scripts: allow to skip travis specific parts in travis-tests (rev2)
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-13 15:48:41 +03:00
Tycho Andersen
851b044027 timerfd: add support for CLOCK_BOOTTTIME
>From https://lwn.net/Articles/428176/:

"CLOCK_BOOTTIME is identical to CLOCK_MONOTONIC, except it also
includes any time spent in suspend (as currently measured by
read_persistent_clock()). This allows applications to get a
suspend aware monotonic clock."

So, I *think* all we have to do is allow the constant, because the only
handling that is different is how the kernel tracks the time.

The motivation for adding this is that new versions of systemd-resolved
(like what will ship in ubuntu 16.10) seems to open a BOOTTIME fd.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-13 15:47:11 +03:00
Tycho Andersen
caf933bf29 timerfd: move the clockid check to dump time too
but let's keep it during restore, since there might be images around that
were generated before we did this check at dump.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-13 15:47:11 +03:00
Pavel Emelyanov
78a3670ba8 parasite: Pass exec start point to parasite_prep_ctl
The parasite_prep_ctl() will become compel call, so it won't
have the code that scans CRIU's vma area list. For pure compel
users we'll need to add simple /proc/maps scanner that'd find
the entry point.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:49:28 +03:00
Kir Kolyshkin
c158ccdf23 handle-elf.c: whitespace cleanup
travis-ci: success for handle-elf.c: whitespace cleanup
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:49:28 +03:00
Tycho Andersen
5e1cfded38 images: rename NONE to CG_NONE
with newer versions of protobuf, I get:

./crit
Traceback (most recent call last):
  File "./crit", line 7, in <module>
    import pycriu
  File "/home/ubuntu/criu/crit/pycriu/__init__.py", line 2, in <module>
    import images
  File "/home/ubuntu/criu/crit/pycriu/images/__init__.py", line 2, in <module>
    from images import *
  File "/home/ubuntu/criu/crit/pycriu/images/images.py", line 52, in <module>
    from pb import *
  File "/home/ubuntu/criu/crit/pycriu/images/pb.py", line 35, in <module>
    from packet_sock_pb2 import *
  File "/home/ubuntu/criu/crit/pycriu/images/packet_sock_pb2.py", line 18, in <module>
    import sk_opts_pb2 as sk__opts__pb2
  File "/home/ubuntu/criu/crit/pycriu/images/sk_opts_pb2.py", line 23, in <module>
    serialized_pb=_b('\n\rsk-opts.proto\"\xe2\x02\n\rsk_opts_entry\x12\x11\n\tso_sndbuf\x18\x01 \x02(\r\x12\x11\n\tso_rcvbuf\x18\x02 \x02(\r\x12\x16\n\x0eso_snd_tmo_sec\x18\x03 \x02(\x04\x12\x17\n\x0fso_snd_tmo_usec\x18\x04 \x02(\x04\x12\x16\n\x0eso_rcv_tmo_sec\x18\x05 \x02(\x04\x12\x17\n\x0fso_rcv_tmo_usec\x18\x06 \x02(\x04\x12\x11\n\treuseaddr\x18\x07 \x01(\x08\x12\x13\n\x0bso_priority\x18\x08 \x01(\r\x12\x13\n\x0bso_rcvlowat\x18\t \x01(\r\x12\x0f\n\x07so_mark\x18\n \x01(\r\x12\x13\n\x0bso_passcred\x18\x0b \x01(\x08\x12\x12\n\nso_passsec\x18\x0c \x01(\x08\x12\x14\n\x0cso_dontroute\x18\r \x01(\x08\x12\x13\n\x0bso_no_check\x18\x0e \x01(\x08\x12\x14\n\x0cso_bound_dev\x18\x0f \x01(\t\x12\x11\n\tso_filter\x18\x10 \x03(\x06*6\n\x0bsk_shutdown\x12\x08\n\x04NONE\x10\x00\x12\x08\n\x04READ\x10\x01\x12\t\n\x05WRITE\x10\x02\x12\x08\n\x04\x42OTH\x10\x03')
  File "/usr/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 827, in __new__
    return _message.default_pool.AddSerializedFile(serialized_pb)
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "sk-opts.proto":
  NONE: "NONE" is already defined in file "rpc.proto".
  NONE: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it.  Therefore, "NONE" must be unique within the global scope, not just within "sk_shutdown".

this fixes that.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:49:28 +03:00
Tycho Andersen
4bc2f7a6bd inventory, lsm: remember to set has_lsmtype
In another "how did this ever work" moment, sometimes this wasn't set and
we didn't propagate the LSM. Let's set it :)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:49:28 +03:00
Tycho Andersen
88620fa5af images: add syntax specifier to autofs.proto
avoids:

[libprotobuf WARNING google/protobuf/compiler/parser.cc:547] No syntax specified for the proto file: autofs.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:49:28 +03:00
Tycho Andersen
f3e412f900 python lib: rename rpc.py to rpc_pb2.py
Unfortunately, newer versions of protobuf check that the file suffix ends
in _pb2.py:

sudo ./zdtm.py run -t zdtm/static/apparmor_stacking
Traceback (most recent call last):
  File "./zdtm.py", line 23, in <module>
    import criu as crpc
  File "/home/ubuntu/criu/test/criu.py", line 12, in <module>
    import rpc
  File "/home/ubuntu/criu/test/rpc.py", line 36, in <module>
    type=None),
  File "/usr/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 652, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.

v2: fix up the clean target, and remove some comments that were about the
    old rename

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:49:28 +03:00
Stanislav Kinsburskiy
dd3a901210 systemd-autofs-restart.sh: explicitly return result from get_fs_type
This helper uses other binaries (like awk), which can fail or be killed.
It this case might be, that no mountpoint is found.
Or, on other hand, the whole mount point path is wrong, and is absend in
mountinfo.
Return explicit error in this case.
Without this patch, script will proceed further, and, since returned value is
empty, it doesn't equal to "autofs", so script will try to bind-mount autofs
mount, resulting in hung.

 travis-ci: success for systemd-autofs-restart.sh: explicitly return result from get_fs_type
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:20 +03:00
Stanislav Kinsburskiy
4e3d0f7d68 mount: fix error print in case of failed bind-mount
This is minor issue, but would be nice to have print in sync with actual
action.

travis-ci: success for mount: fix error print in case of failed bind-mount
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:20 +03:00
Kir Kolyshkin
c42f6ce2e6 test/Makefile: rm bad code
The 'umount2: umount2' doesn't make sense as it's a circular dependency.
It came from commit e7b152fd and probably meant to say
"umount2: umount2.c" instead.

But it's not needed either as make has implicit rules like that.

Drop the "zdtm_ct: zdtm_ct.c" for same reason.

travis-ci: success for test/Makefile: rm bad code
Cc: Andrei Vagin <avagin@openvz.org>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:20 +03:00
Kir Kolyshkin
ca2cee201e doc/Makefile: fix deps
The "$(SRC): $(FOOTER)" dependency listed is incorrect, as criu.txt file
is not dependent on footer.txt. Having said that, criu.8 in fact do
depend on footer.txt but that was not reflected in Makefile. Fix it.

While at it, add the custom.xsl dependency, which was also missing.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:20 +03:00
Kir Kolyshkin
9ca1db576b doc/Makefile: make sure CRIU_VERSION is defined
I just discovered that if I run make right from Documentation/ subdir,
CRIU_VERSION is not defined so the generated man page is lacking it.

Let's fix by conditionally including ../Makefile.versions.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:20 +03:00
Kir Kolyshkin
cdd7858207 Makefile: move default goal up
Since commit e6dcf46 there is no need to specify the default goal
explicitly.

The common convention for Makefiles is the first goal in the file
is the default one, so most universally there's "all:" goal
at the beginning. Let's adhere to this convention, moving
the "all:" up where it is to be expected.

[v2: keep the DEFAULT_GOAL for clarity]

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:19 +03:00
Cyrill Gorcunov
4b0bbb3da9 nmk: built.mk -- Add missing space
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Savonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:19 +03:00
Cyrill Gorcunov
cd1ee2e2a2 criu: Fix strict prototypes
To make compiler happy with -Wstrict-prototypes option.
No func change.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:19 +03:00
Pavel Emelyanov
c4702802f9 mem: Move mem_pp from ctl to pstree_item's dmpi
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Pavel Emelyanov
781a2e0769 mem: Use pstree_item pid in pages dump calls
Same as for files -- don't use data from soon-to-be opaque ctl.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Pavel Emelyanov
ee39915124 mem: Add pstree_item arg to dump_pages calls
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Pavel Emelyanov
6349ffe0bb fd: Don't use data from parasite_ctl
The structure will become private to compel, so only
keep one as an opaque pointer for parasite API.s

In particular, use item.pid instead of ctl.pid.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Pavel Emelyanov
d5092dd3cb fd: Rename fdparms.ctl -> .fd_ctl
For easier grepping.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Pavel Emelyanov
1be674de20 pre-dump: Don't use ctl->pid
We have pstree_item there.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Pavel Emelyanov
0272e3e612 sigframe: Use blkset from ctl
When constructing sigframe for parasite, we my use ctl's blkset,
not the CoreEntry's one. This simplifies further patching.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Kir Kolyshkin
25a1acd8cc nmk/script: rm bad code
I discovered that the scripts/ suffix is added to __nmk_dir despite
the fact it already contains it, ending in obviously wrong filenames
like scripts/nmk/scripts/scripts/msg.mk. As those files are non-existent,
make tried to recreate every .mk file, spawninga child to execute 'true'
command, like this (part of "make -dr" output):

> Considering target file '../scripts/nmk/scripts/scripts/include.mk'.
>  File '../scripts/nmk/scripts/scripts/include.mk' does not exist.
>  Finished prerequisites of target file
> '../scripts/nmk/scripts/scripts/include.mk'.
> Must remake target '../scripts/nmk/scripts/scripts/include.mk'.
> Putting child 0x564ec1768740 (../scripts/nmk/scripts/scripts/include.mk)
> PID 21633 on the chain.
> Live child 0x564ec1768740 (../scripts/nmk/scripts/scripts/include.mk)
> PID 21633
> Reaping winning child 0x564ec1768740 PID 21633
> Removing child 0x564ec1768740 PID 21633 from chain.

The fix was to remove the extra scripts/, but once I did it, I found
out problem #2: these targets, being defined in contents that is often
included in the beginning of Makefiles, hijacks the default make
target (the first one in the Makefile), breaking the usual and
expected make behavior, and forcing to use .DEFAULT_GOAL.

Finally, I don't know why these targets are there, i.e. what purpose
do they serve. Maybe it was done to exclude any implicit rules to
re-make those files, but there are no such rules as far as I can see.

So, in order to address problem #2, I have removed these targets.
I don't see any harm in doing that; let me know if it breaks anything.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Kir Kolyshkin
9e2ce61cac Makefile nitpicks
1. As __nmk_dir already ends with a slash, there's no need
   for an extra one.

2. No need to include macro.mk into criu/Makefile -- nothing it defines
   is used from there.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Kirill Tkhai
0aa9eee5f4 mount: Correct s_dev conversion in mount_cr_time_mount()
Convert stat()'s st_dev to kdev bacause mount infos need it.
Like in fetch_rt_stat() function.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Eugene Batalov
337d0cadc6 shmem: don't use anon shmem changes tracking by default
Anon shmem changes tracking has known bugs.
So don't use it by default. Enable it only when
CRIU_TRACK_SHMEM env variable is defined.

Now we can run transition/shmem test in CI because it works:
python test/zdtm.py run -t zdtm/transition/shmem --pre 3

Cc: Andrei Vagin <avagin@virtuozzo.com>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Eugene Batalov <eabatalov89@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:25 +03:00
Pavel Emelyanov
e892245ded parasite: Simplify get_vma_by_ip()
We only really need this call to find where we can dive
into the victim to make a single (!) syscall. So no need
in such a complication, just have get_exec_start() call
that finds such vaddr.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
2016-10-05 13:11:25 +03:00
Pavel Emelyanov
8d1ee5f83e mem: Fix misprint in prev patch
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:25 +03:00
Pavel Emelyanov
227e5340ed mem: Cleanup dumping pages controls
This makes the API cleaner -- now we tell to parasite_dump_pages_seized
only two things -- whether it's pre-dump or not and, if not, whether this
is lazy dump.

And make it do all the other decisions himself.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2016-10-05 13:11:25 +03:00
Pavel Emelyanov
30098d452f mem: Split draning pages from xfer-ing them
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2016-10-05 13:10:33 +03:00
Pavel Emelyanov
41c3ca8616 dump mem: Replace two bools with ctl struct
This is to make it easier to extend this logic further.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2016-10-05 12:00:16 +03:00
Kir Kolyshkin
b149048812 Documentation: enable monospaced font in PS/PDF
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
5c6817349d Documentation: prettify the man page
This adds a way to re-enable justification and hyphenation for
the man page (which in enabled by default in troff but then
Docbook explicitly disables it). The man page looks better this way.

The reason why hyphenation for man pages is disabled by Docbook is
"The problem is that groff is not particularly smart about how it
does hyphenation; it can end up hyphenating a lot of things that you
don't want hyphenated".

The reason why justification for man pages is disabled by Docbook is
"justified text looks good only when it is also hyphenated.
Without hyphenation, excessive amounts of space often end up
getting between words, in order to "pad" lines out to align
on the right margin".

I carefully checked the resuling man page using both terminal output
on 80 columns and the PS/PDF generated. In both cases hyphenation
looks normal, i.e. I don't see any unwanted cases of extra hyphenation.
Same for justification.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
69c79bb500 criu(8): massive man page update
This is an attempt to cleanup the man page. I am very sorry this comes
in this one big patch. Here are the changes:

1. Use *BOLD* for literals, 'ITALIC' for arguments (variable
substituions)

2. Do not use <> for arguments, as they are already marked so (italic)

3. Remove details about "criu exec" and remote syscalls execution;
   add note that it's obsoleted by Compel.

4. Some descriptions are shrunk, some made longer, many are rephrased.

5. Formatting: use second-level lists (*value*:::) where appropriate
   (mostly instead of bulleted lists of values).

6. Properly show comma-separated lists of arguments (with second pair
   of [] and ...

7. Proper use of terms 'option' and 'argument' (*--option* 'argument').

8. Other fixes to formatting and English (such as missing a/the articles).

...

98. Change author to be "the CRIU team".

99. Update copyright years, copyright holder is Parallels Holdings.

[v2: rebase]

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
4edc7c9cb2 Documentation/Makefile: set nmkdir
I was not able to find a way to make a target in sub-makefile
(such as "cd Documentation && make pdf") without this hack.

If there's a better way, please let me know

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Dmitry Safonov
e38c37f05a Travis: check mrproper cleanings
Let there be more make-tests.

Cc: Adrian Reber <adrian@lisas.de>
Cc: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:00 +03:00
Stanislav Kinsburskiy
0bda4caa43 zdtm: add test for shared threads FS structure migration
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:54 +03:00
Stanislav Kinsburskiy
a8969a9542 restorer: add forgotten CLONE_FS flag for threads clone
Threads must share fs struct. Without this path each thread has it's own fs
struct.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:54 +03:00
Pavel Emelyanov
2c623a56b1 mount: Move fstypes related code into separate files
After this the mount.c is no longer the fattest .c in the tree:

  - before
    3947 criu/mount.c
    3179 criu/cr-restore.c
    2622 criu/proc_parse.c
    2095 criu/tty.c

  - after
    3179 criu/cr-restore.c
    3170 criu/mount.c
    2623 criu/proc_parse.c
    2095 criu/tty.c

One "not move" thing is -- since fstype array is static to the
filesystems.c and mount.c needs to access fstype[1] for auto
mounts, the fstype_auto() call is added.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:54 +03:00
Kirill Tkhai
f0ea03bdbf mount: Corrent sibling path when parent and child have the same mountpoint
When m and pa are mounted in the same directory, rpath is initialized
to empty string (rpath[0] points to '\0'). In this case snprintf() at
the bottom of function makes path have '/' at the end.

In further, function validate_shared(), which uses the result, calls
find_shared_peer() and fails to find a peer.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:41 +03:00
Pavel Emelyanov
5f30c24964 mount: Do not set key to anything for auto-ext-mounts
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:41 +03:00