- 09 Apr, 2012 5 commits
- 
- 
Pavel Emelyanov authoredThe regfile's ID of a VMA is stored in its shmid field. And the file itself if sumped into regfiles.img image with 'special'-ly generated ID (i.e. -- just allocate a new unique one). Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredIt's an O(n) algorithm. Now we iterate both lists simultaneously to find a hole. [xemul: Discussion making the patch more understandable: Cyrill: If s_vma is the last one on self_vma_list you could break immediately, no? And the snippet I somehow miss is -- how the situation handled when hole a b source |----| |-----| target |----| |-----| c d the hole fits the requested size but the hole is shifted in target, so that you've prev_vma_end = a and then you find that a - d > vma_len and return a as start address for new mapping while finally it might intersect with address c. Or I miss something obvious? Andrey: Look at "continue" one more time. prev_vma_end is returned only if both condition are true if (prev_vma_end + vma_len > s_vma->vma.start) { .... if (prev_vma_end + vma_len > t_vma->vma.start) { ... Signed-off-by:Andrey Vagin <avagin@openvz.org> Looks-good-to: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredBecause amount of entries are known. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredSigned-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authored[ xemul: The fix effectively is -- stop scanning the 2nd vma list once we see, that the hint's end hits the next vma ] Signed-off-by:Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
 
- 
- 06 Apr, 2012 15 commits
- 
- 
Pavel Emelyanov authoredA file pointed by an fd should be not unlinked and be open-able with the provided path (overmounts and/or renames coupled with links can screw it up). Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Cyrill Gorcunov authoredIn case if no goals specified the all goal is implied so don't forget to generate deps. This as well fixes a problem where two "make clean" in a row forced build system to regenerate deps. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Looks-good-to: Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredIt was required before we switched to socketpair restore scheme. Now it's not required, sockets just connect to the peer they want to. Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredNo image copy occurs since 2b175282, so this fd can be hidden. Thus fixind the FIXME near it :) Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Kir Kolyshkin authored"Has not" + noun is obsoleted and very rare English. Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Kir Kolyshkin authoredSigned-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredrasite_cure_seized frees parasite_ctl Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredSigned-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredSigned-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredIntroduce and use generic file_desc ops for this. Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredNo need in per-type hash tables and search routines. We can handle it via generic file_desc structure. Some more thoughts on unixsk and pipe lists are still required :( Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredThe struct replaces bare list_head on all of the _info-s we've introduced recently. Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredSigned-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredSigned-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredThis is a big change, yes. Dump unix sockets in the same manner as all the other files are done now. A few notes however. 1. We explicitly drop names for connected stream sockets. This is done to avoid conflicts with names -- accepted sockets share their names with the listening parent. This can be done later by binding a socket to a name, them renaming it to some temporary uniq one and at the very very end renaming some back to original. 2. Interconnected sockets are restored via socketpair() call. This is correct, but names are dropped. Need to bind() sockets after this (yes, this can be done), but for this we need to implement the trick with renames described before. 3. FD for socket queues is constantly re-opened not to resolve fd conflicts. Need to use service fds engine for this later. 4. Some code cleanup is still required, yes (will follow shortly). Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
 
- 
- 05 Apr, 2012 20 commits
- 
- 
Cyrill Gorcunov authoredSigned-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredSigned-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredSigned-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredA pipe buffer has 16 slots. A slot is page, offset and size. When we use splice and data is not aligned, splice connects a page from file cache and set offset. For this reason we loose a part of buffer. If a data size is more than 15 pages, data will be aligned in a image. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authored[xemul: This check in open_transport_fd should go away once we implement opening files with peers. ] Signed-off-by:Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredFor example it's pipe. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredpipe_entry is encapsulated in pipe_info. All pipe_info-s connects in the list pipes. All pipe_info-s with the same piep_id connects to pipe_list, it a circular list without a defined head. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredThey will be used to restore pipes Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredSigned-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredInformation about pipe's file structs saved in one global file and fdinfo_entry is saved for each descriptor Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authored[ xemul: I don't know how to make this with incremental changes either, and just go with it :( ] Signed-off-by:Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authored* create pipe * write a maximum amount of data * suspend/resume * check that all data have been restored Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Andrey Vagin authoredSigned-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredIt was used in old code, now it can be dropped Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredAdd two checks -- that peer exists and it we will be able to connect to him somehow on restore. Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredThis maybe not 100% correct in the generic case, but the way unix sockets are used lets us do this trick. Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredSigned-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Pavel Emelyanov authoredNo need in separate per-type fn for doing this. We can just find the respective fd list and do sorting in the generic code. Signed-off-by:Pavel Emelyanov <xemul@parallels.com> 
- 
Cyrill Gorcunov authoredSigned-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
- 
Cyrill Gorcunov authoredSince proc_parse.h declares functions which have list_head as arguments, it should include list.h and basic types. Otherwise if included into the files without list support the compilation might fail as | | In file included from cr-check.c:5: | ./include/proc_parse.h:83: error: expected declaration specifiers or ‘...’ before ‘bool’ Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com> 
 
-