Since fdinfo patches were merged to -mm
tree the output format has been slightly
changed. So update our tool accordingly.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
A value of signo is in [1, SIGMAX].
Currenly signals are enumirated from 1 to SIGMAX, but SIGMAX
is not included. This patch fixes this mestake.
v2: * save backward compatibility
* set a correct value of SIGMAX = 64. It can not be in a
separate patch, because a format is changed again.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
When resetting nr_in_progress for next stage no need
in waking up anyone. Nobody waits for it yet :)
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Switching to a new stage is 4-step procedure which
deserves its own helper. Besides, now the information
about how many tasks participage in each stage is
collected in one place.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
When finishing a stage we have to report this (decrement the
number of tasks in stage) and wait while stage switch. Write
a helper that does both.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
If you have an error in parasite.c and execute make from vim,
without this patch vim opens a new file parasite.c in a root directory.
With this patch vim opens pie/parasite.c.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This patch adds check for "/proc/sys/kernel/sem_next_id" to make sure, that
kernel supports restore of IPC objects.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Old interface with modified IPC syscalls is deprecated is replaced sy sysctls.
This patch updates CRIU to use new interface.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
* add exclude list. Tests from this list are executed only on C/R kernels
* check that a version of a kernel is greater than 3.7
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
A error message is printed.
We want to save ability to try crtools on non C/R kernel.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This function prints an error message only once.
[xemul: change ({}) to do {} while (0)]
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Same as eventpoll -- we might have no watchee assigned
but only inotify descriptor created.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The SO_BINDTODEVICE getter is changed in the kernel (before
official release) to report not index, but name to be in
harmony with setter.
Fix crtools accordingly.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Otherwise test with -d option get fail (this is because
SIGTRAP get cleared by our parasizte engine).
The proper fix most likely will require kernel patching
or redesign of parasite code. Meanwhile to make test
working we switch to the signal which just known to work.
Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The tls_data is used for read-cycles only thus
there is no need for mutex since this area get
filled earlier than fork() issued.
Same time on restore the tls filled before the
program restarts.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
If we have tree threads, a following situation can occur:
T2: dec task_entries->nr_in_progress
T3: dec task_entries->nr_in_progress
T3: futex(&task_entries->nr_in_progress, WAKE_UP);
T1: unmap task_entries
T2: futex(&task_entries->nr_in_progress, WAKE_UP) -> EFAULT -> BUG_ON()
This patch adds a futex for synchronising threads.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Since we have find_next_bit in our sources now, lets
use for_each_bit helper to speedup a search procedure.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>