- 12 Jan, 2012 6 commits
-
-
Pavel Emelyanov authored
Path is not needed there -- we can call the get_image_path() in prep_cr_fdset_ routines and in parasite-syscall.c when required. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Remove unneeded path argument (we do know the file data is read from) and actually bogus show_header boolean. Also introduce two helpers for showing header and tail. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
This one is required on allocation -- it's already there as an argument. It's also required on free, but we can check for fd being >= 0. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
All the places we need one in can use the direct reference on template. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
This also catches potential NULL dereference. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
I case if there is no file id provided we might be writting stack data to image. Better put zeros there. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 11 Jan, 2012 9 commits
-
-
Cyrill Gorcunov authored
Everything is on http://criu.org/TodoReported-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Some process can share one struct file-s, we may find them by "object IDs". A file descriptor is opened in one process and send to other via unix socket. The procedure of restoring files contains four stages. * Collect data about all file's descriptors On this stage we find process which will restore a file descriptor and create a list of processes, who should get this descriptor. * Create datagrams unix sockets If a file descriptor should be received, a unix socket is created instead of it. * Open file descriptors A process with the least pid opens a file and sends this file descriptors to all one who wait it. * Receive file descriptors. When we were thinking up this algoritm, we wanted to minimize a number of context switches. A number of context switches is proportional of a number of processes. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Remove excessive checks and keep it a pointer. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
The mmap hint is always NULL. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
The last one is always CR_FD_PAGES. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Introduce a helper for walking the list and sending signals. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 10 Jan, 2012 14 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
To include dgram bound && connected sockets, for example CR_FD_UNIXSK: /home/cyrill/crtools/unixsk-2813.img ---------------------------------------- fd 3 type 1 state 1 namelen 0 backlog 0 id 19505 peer 19506 fd 4 type 1 state 1 namelen 0 backlog 0 id 19506 peer 19505 fd 5 type 2 state 7 namelen 0 backlog 0 id 19507 peer 0 fd 6 type 2 state 7 namelen 18 backlog 18 id 19508 peer 0 --> test-socket-bound fd 7 type 2 state 7 namelen 0 backlog 0 id 19509 peer 19510 fd 8 type 2 state 7 namelen 17 backlog 17 id 19510 peer 0 --> test-socket-conn fd 9 type 2 state 7 namelen 23 backlog 23 id 19511 peer 19511 --> test-socket-bound-conn ---------------------------------------- The last one is bound and connected. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Use same format as we do for VMA names. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
And add some comments. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
This code opens a log file and duplicates the descriptor to logfd, but forgets to close the first one. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 04 Jan, 2012 11 commits
-
-
Cyrill Gorcunov authored
Restorer does really restore shared memory (including page contents restore) only on master process, while all other processes do open such memory area via map_files/ procfs entry so that we might have a situation when shared VMA is present in some particular core-%d.img file but it's not listed in collected shmems array and find_shmem_by_pid will return NULL. This is perfectly fine, be ready for that. Another issue is that shared memory might look like CR_FD_SHMEM: /home/cyrill/projects/kernel/crtools/shmem-2641.img ---------------------------------------- 0x7f2200775000-0x7f2200776000 id 19664 0x7f2200776000-0x7f2200777000 id 19663 ---------------------------------------- So vma area is [x;y) range and we should distinguish two shmem lookup cases - one when we search for page in shmem area - second when we lookup shmem area in collected ranges They both have a different lookup conditions so single find_shmem splitted into two helpers find_shmem and find_shmem_page as appropriate. This patch finally fixes the three process asynchronious shared memory updates test-case. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
We might be needing to close the shmems file descriptor. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Just in a sake of consistency Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Style tuning, no func change Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Dumping procedure does check for VMA_ANON_SHARED so the same should be done at restore time. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
The remapping of /proc path to shmem should be done with pid of process which did mmap() call initially. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-