- 23 Mar, 2012 3 commits
-
-
Stanislav Kinsbursky authored
This is a precursor patch. Macro for max possible fd type will be required. And it's easier to use enum in this case. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> 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>
-
- 22 Mar, 2012 11 commits
-
-
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
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>
-
Stanislav Kinsbursky authored
This is a cleanup patch. This tree is merged only once. So it's image file can be opened by opne_image() call and dumped right after collect stage. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Since the collect_shmems updates start address for vmas, for two shared mappings in one task we'll try to dup() the 1st restoration attempt, since the si's start will be set to the 2nd one, which is not yet restored. Thus we should map-and-open the first one being restored, not the one with matched address and dup() all the rest. [avagin@: There's no such thing, since the collect stage checks for pid being less _or_ _equal_ and this only the first vma's start will be saved. But anyway, this makes it more obvious.] Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Just make the fixup_vma_fds read and write vma images and those called by it provide and fd for this. Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 21 Mar, 2012 11 commits
-
-
Pavel Emelyanov authored
The core image now contains only core per-task stuff. The new file resurrects Tula magic number removed earlier. Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This routine will be used more widely and we will be generating sockets with name based on some predefined unique value rather than 'pid', so name argument this way. No change on functional level. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> 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>
-
Andrey Vagin authored
It's a rudiment from old times, when restore worked via ececve. Now we modify the core file in place to fixup vma-s. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Now it has only one descritor for dumping pages v2: remove rudiments Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
vma_entry contains shmid and all shared memory are dumped in own files. The most interesting thing is restore. A maping is restored by process with the smallest pid. The mamping is created before executing restorer. We map a full mapping and restore it's conten, then we open a file from /proc/pid/map_files and store a descriptor in vma_info. The mapping is unmaped. Now we can map any region of this mapping in the restorer. We use this trick, because a target process may have this mapping in some places and the restorer has not function to open proc files. v2: fix error hangling xemul: Fixed static-s and args for cr_dump_shmem 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
Because 0 is actually a valid value. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It will be used to restore shared mappings v2: clean up Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
* map a big memory region * fork * unmap the first and tenth pages * remap one page in another place * touch a few pages * check content of touched pages Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 19 Mar, 2012 5 commits
-
-
Andrey Vagin authored
Now a name of an image file is hard coded ("smth-%d.img", pid), but the images of namespaces, shared memery, etc belong to not one task, so they may have other formats of names, which will describe objects. For example a image of shared memory content may have name like this ("pages-shmem-%ld.img", shmid) v2: fix comment v3: rebase Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This patch makes crtools to work with new /proc/pid/exe symlink restoration (the kernel part was reviewed by Oleg). So this patch is for new shiny kernel only (!), thus I suggest all developers to move on kernel crtools-3.3 (which can be found at usual place) and pick up this patch for crtools itself. (again, with this patch anything but crtools-3.3 will not work) Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It happened some routines in parasite service code were not following calling convention so I fixed the callers and added a comment about adding new code here. At the same time the 3 error code madness is dropped as being requested by Pavel -- now we return one error code only. The PARASITE_ERR_ codes were dropped as well due to become redundant. The status of parasite service routine is set via SET_PARASITE_RET helper. In case if there is no error -- just return 0. The calling code should not expect to find anything sane in parasite_status_t because parasite code might not touch it at all. Same time, due to this convention the parasite's dump_socket_queue is getting rid of third @err member, because it's now returned as a regular error code. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Before this patch it may contain only a few megabytes. I think a real application may have a bigger mappings. 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>
-
- 16 Mar, 2012 9 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Using absolute paths for this is dangerous - while doing c/r we should be extremely carefully and not change tasks' roots and mount namespaces too early. Sometimes it will not work -- when restoring containers we'll be unable to switch to new CT and still have the ability to open images. Rework the images opening via openat and keep the image dir fd open all the time as the service fd (introduced earlier). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
These are the fds that help us to do c/r. We want them not to intersect with any "real-life" ones and thus store them close the the file rlimit boundary. For now only the logfd one is such. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Stanislav Kinsbursky authored
No need in checking the pid in every task loop cycle, just dump it at the beginning and that's it. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@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>
-
- 15 Mar, 2012 1 commit
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-