- 21 Apr, 2014 9 commits
-
-
Andrey Vagin authored
read_mnt_ns_img() is splited on two parts. The first part enumirates all namespaces and call the second part, which read a proper image file. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currently we support nested mount namespaces, only if all of them have the same path to the root. crtools doesn't mount root, so it should be bind-mounted for all namespaces. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Each sub-namespace is restored as sub-tree of the root mntns, so the parent of sub-mntns root is the root of the root mntns. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
When we'll restore nested mount namespaces, all but root ones (sub-namespaces) will be restored as sub-mounts in the root mount namespace. So mi->mountpoint will be not '/' even if a mount is root for its mntns. v2: s/is_root/is_ns_root/ Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currently ns_ids list is filled only on dump. Soon we'll need this list for mount namespaces on restore, e.g. to know which tasks share the namespaces. v2: merge the patch "namespace: add a function to search an ns_id item by id" into this one. v3: add prefix rst_ to add_ns_id v4: look up namespace by two values -- type AND ID Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We are going to restore nested mount namespaces and we will need to change root for each of them. v2: don't call chdir in a second time, because a path may be relative Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currently it's initialized for the root mount namespace, but we are going to dump nested mount namespaces. It's used in open_mountpoint(), which is used in dump_tmpfs() and in other callbacks. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We're about to collect root several times in a row, so keeping the old one isn't required. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We have a race. Consider we have 3 tasks, A, B and C. A and B share fdtable, C -- does not. Then we might be in a situation when A is restoring memory reading mem images, and B -- forking the C child. In that case descriptors held by A (for mem restore) will be inherited by C and will not get closed. This reverts commit d36e07aa.
-
- 18 Apr, 2014 4 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
BTRFS returns subvolume dev-id instead of superblock dev-id Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
BTRFS returns subvolume dev-id instead of superblock dev-id, so we need to know which mounts are btrfs. The mi->fstype->name is "unsuppoerted" here, because the fstype->code is saved in an image { .name = "unsupported", .code = FSTYPE__UNSUPPORTED, }, { .name = "btrfs", .code = FSTYPE__UNSUPPORTED, } An a second reason is that pocesses can be migrated from smth to btrfs. This all can happen _only_ for the root mount and for bind mounts of the root mount... Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tikhomirov Pavel authored
here was bug cause if e.g.: iterative snapshots are made and between two of them new process in process tree was created, it can have pages which are non dirty, and won't save them into image. but there is no parent image for it. pages which are non soft-dirty appear if process with some pages in non dirty state forks, child will inherit those pte's and if child don't write to those pages, they will be still in non soft-dirty state when next dump comes. also this bug was not catched because of error in zdtm, look 3/3 v2: simplify, add more justification in commit message. Signed-off-by:
Tikhomirov Pavel <snorcht@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 17 Apr, 2014 13 commits
-
-
Andrey Vagin authored
"relative path" is absolute path with dot at the beginning. We already use relative paths on restore. In this patch we add "." on dump too. It's convinient, because we needed to add dot each time when we want to access this mount point. Before this patch we had to created a temporary copy. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Now we have two funсtions which do mostly the same, so this patch merges them. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
st_dev and s_dev have different formats. st_dev is (MAJOR(dev) << 8) | MINOR(dev) s_dev is (MAJOR(dev) << 20) | MINOR(dev) so we need to convert one of them v2: use kdev_to_odev Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Only one function use DIR, so I don't see reason to return it Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It's already used for dumping files and it will be used for restoring, so it should be service fd to avoid intersection with restored descriptors. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Do the same as was done with timers. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This appeared after latest 1.2, so it's still possible to do this move. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Make explicit checks and helpers for legacy images. This should facilitate its removal some day in the future. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This as well gives us minus one image per-task and allocates more space on core task entry. One thing to note -- the amount of posix timers is not easily accessible at the core entry allocation time, so the respective array is allocated on demand. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This allows to have one image less per-task, which in turn reduces live migration time a little bit. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This one will hold all info about timers in the core_entry. Since timers are always per-task, this one is on task core entry. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 15 Apr, 2014 1 commit
-
-
Cyrill Gorcunov authored
There are a few nits in protobuf generation (which in most cases are harmless but somethime may cause building procedure to fail) - Deps files over generated sources should be produced only when _all_ .proto files are handled, because we include headers which are autogenerated as well, thus simply wait until everything is complete then use compiler to generate deps files - typo in non-clean targes, i rather should use proto-obj-y objects Reported-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 14 Apr, 2014 2 commits
-
-
Tikhomirov Pavel authored
otherwize it won't use/check parent snapshots, only last one on restore. Signed-off-by:
Tikhomirov Pavel <snorcht@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tikhomirov Pavel authored
Signed-off-by:
Tikhomirov Pavel <snorcht@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 11 Apr, 2014 11 commits
-
-
Andrey Vagin authored
A process can be restored in a new pidns. close_old_fds() opens the /proc/PID directory. Without this patch we can see errors like this: (00.333915) 1: Error (util.c:102): Unable to close fd 6: Bad file descriptor Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The root mount is an external mount and its source can be not '/'. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The source of the root mount may be not equal to "/" and we need to take this fact into account, when we bind-mount it to somewhere. For example: 11877 ? Ss 0:00 ./bind-mount --pidfile=bind-mount.pid --outfile=bind-mount.out --dirname=bind-mount.test 11880 ? Ss 0:00 \_ ./bind-mount --pidfile=bind-mount.pid --outfile=bind-mount.out --dirname=bind-mount.test [root@avagin-fc19-cr crtools]# cat /proc/11880/mountinfo 68 42 8:3 /root/git/crtools/test / rw,relatime - ext4 /dev/sda3 rw,data=ordered 43 68 0:33 / /proc rw,relatime - proc proc rw 44 68 0:34 / /dev/pts rw,relatime - devpts pts rw,mode=666,ptmxmode=666 45 68 8:3 /root/git/crtools/test/zdtm/live/static/bind-mount.test/test /zdtm/live/static/bind-mount.test/bind rw,relatime - ext4 /dev/sda3 rw,data=ordered The 45 mount is bind-mount of the 68 mount. mi(45)->root = /root/git/crtools/test/zdtm/live/static/bind-mount.test/test mi(68)->root = /root/git/crtools/test so the comman part is "/root/git/crtools/test" and the command is mount --bind /zdtm/live/static/bind-mount.test/test /zdtm/live/static/bind-mount.test/bind Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
aarch64: TLS register checkpoint/restore implementation by Christopher Covington. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Christopher Covington <cov@codeaurora.org> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
These messages are constructed in the same spirit as ARM and x86 ones except for two major points: * general-purpose registers are stored in a variable-length array of uint64's: the architecture provides 32 general-purpose registers that makes it unfeasible to create a separate protobuf field for each of them since it requires a lot of "copy-paste" to convert between the struct pt_regs and protobuf message; the length of the array storing registers is to be checked by the architecture- dependent CRIU code; * AArch64 FP/SIMD registers are 128 bit long while protobuf lacks the support for integers of this size; the FP/SIMD registers are stored in an array of uint64, two consecutive elements of the array represent a single FP/SIMD register. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
This will make comparison with other ports easier. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
CRIU can handle stopped multithreaded processes when all threads are stopped. Refine the check to allow this case. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
Otherwise, `make install` may fail. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-