- 04 Jan, 2012 5 commits
-
-
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
Also add a few more comments. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
And use SHMEMS_SIZE constant as well. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
In commit 99eb3d09 we started to use self-contained shared memory region but it revealed the problem that anonymous sgared mappings might be parsed by parse_maps incorrectly, so fix it and be ready to get anon-shared mappings. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 30 Dec, 2011 3 commits
-
-
Cyrill Gorcunov authored
Also make output a bit more fancy, as CR_FD_UNIXSK: unixsk-2440.img ---------------------------------------- fd 3 type 1 state 1 namelen 0 id 19406 peer 19407 fd 4 type 1 state 1 namelen 0 id 19407 peer 19406 fd 5 type 2 state 7 namelen 7 id 19408 peer 0 ---> [tst-sk] fd 6 type 2 state 7 namelen 0 id 19409 peer 0 fd 7 type 2 state 7 namelen 0 id 19410 peer 19411 fd 8 type 2 state 7 namelen 8 id 19411 peer 0 ---> [tst-sk1] ---------------------------------------- Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
It also tests for possible dup() call error. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 29 Dec, 2011 1 commit
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 28 Dec, 2011 8 commits
-
-
Pavel Emelyanov authored
Several places just need to open an image, thus the helper is OK to use. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
It duplicates the show_dump_file pointer. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
To follow rest of code - use !x for xalloc result tests - structure members are tab aligned - multiline assignments over structure members are aligned as well 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>
-
- 27 Dec, 2011 6 commits
-
-
Cyrill Gorcunov authored
UNIX_PATH_MAX is a size of path, so max length should never be equal to such size. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
For better readability. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Since we're not system library - no underscopes in functions name until really needed and known to not clash with posix namespace - empty line between system headers and own headers for readability - extern for function prototypes Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Drop USK_DEBUG, we have dprintk which is active if compiled with make DEBUG=1 Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
We provide such type in types.h. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 26 Dec, 2011 16 commits
-
-
Cyrill Gorcunov authored
This allows to use pr_debug and dprintk helpers. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
For easier debugging. We can zap it at release time. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Otherwise getting errors like | CC libnetlink.o | In file included from libnetlink.c:4:0: | ./include/libnetlink.h:34:0: error: "NLMSG_LENGTH" redefined [-Werror] And make macros a bit more readable. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Cosmetic change. 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> [gorcunov: A few tuneups] Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> [gorcunov: log error in restorer.c] Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
The next patch will remap shmems region and will use it in restorer. Actually this patch moves shmem_nr to struct shmems. Signed-off-by:
Andrey Vagin <avagin@openvz.org> [gorcunov: Various tuneups] 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
Based-on-patch-from: Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrey Vagin <avagin@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Currently it can only work with stream sockets, which have no skbs in queues (listening or established -- both work OK). The cpt part uses the sock_diag engine that was merged to Dave recently to collect sockets. Then it dumps sockets by checking the filesystem ID of a failed-to-open through /proc/pid/fd descriptors (sockets do not allow for such tricks with opens through proc) against SOCKFS_TYPE. The rst part is more tricky. Listen sockets are just restored, this is simple. Connected sockets are restored like this: 1. One end establishes a listening anon socket at the desired descriptor; 2. The other end just creates a socket at the desired descriptor; 3. All sockets, that are to be connect()-ed call connect. Unix sockets do not block connect() till the accept() time and thus we continue with... 4. ... all listening sockets call accept() and ... dup2 the new fd into the accepting end. There's a problem with this approach -- socket names are not preserved, but looking into our OpenVZ implementation I think this is OK for existing apps. What should be done next is: 1. Need to merge the file IDs patches in our tree and make Andrey to support files sharing. This will solve the sk = socket(); fork(); case. Currently it simply doesn't work :( 2. Need to add support for DGRAM sockets -- I wrote comment how to do it in the can_dump_unix_sk() 3. Need to add support for in-flight connections 4. Implement support for UDP sockets (quite simple) 5. Implement support for listening TCP sockets (also not very complex) 6. Implement support for connected TCP scokets (hard one, Tejun's patches are not very good for this from my POV) Cyrill, plz, apply this patch and put the above descriptions onto wiki docs (do we have the plans page yet?). Andrey, plz, take care of unix sockets tests in zdtm. Most likely it won't work till you do the shared files support for sockets. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
When opening an fd at a position where the current image fd sits the latter one should be moved. Introduce a helper for this. Signed-off-by; Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Nobody cares the returned fd, so just make it 0/-1 and clean up the callers. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Due to code specifics (we're running without glibc support) we need own one. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 25 Dec, 2011 1 commit
-
-
Cyrill Gorcunov authored
Otherwise -EINVAL returned Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-