- 02 Apr, 2012 14 commits
-
-
Pavel Emelyanov authored
Same as prev 2 patches now for the unix sockets. They are still in per-pid image files, but this is going to change soon (I hope). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Same as previous patch -- pull inet sockets in and store in the hash for the same reasons. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Instread of re-reading this image again and again on every fd restore, pull the reg-files.img in early and store the entries in a hash. This will simplify the further fd restoring fixes and will allow for dump/restore via a stream (socket). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
At moment no-deps-targets is empty thus changes in headers do not cause correspond source files to be rebuilt. Fix it. Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This object file will be handled by ld script so .text sections will be squashed into one common section. Thus no need to force these functions being always-inlined. It's a rudiment from time when we were not using ld at all but #include source code file itself and now this attribute might confuse code readers since it's unclear _why_ it's needed at all. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
There is no need for specific parasite or restorer head sections, a general "head" one is enough. Also .stack section is dropped since it's never used. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Otherwise I get | sockets.c: In function ‘dump_socket’: | sockets.c:467: error: ‘st.st_ino’ may be used uninitialized in this function Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Since kernel commit 9c501935a3 the sys/socket.h should be included prior the linux/netlink.h. Make it so. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It has been used when debuggin without PTRACE_SEIZE, not needed anymore. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's wrong to treat restore_thread_exec_start as arguments area (I managed to overlook this problem in commit 01484182) it's rather a function start address. The thread arguments area allocated dynamically after the restorer blob itself. We didn't hit any problems earlier simply because there were a few bytes owerwritten in function prologue. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> CC: Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Otherwise I'm getting error | | files.c: In function ‘prepare_fds’: | files.c:329:23: error: ‘tmp’ may be used uninitialized in this function [-Werror=uninitialized] | files.c:309:6: note: ‘tmp’ was declared here 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>
-
Pavel Emelyanov authored
It's used only to check whether we should do file re-send and verify we've served all the cliens. This can be replaced with proper list manipulations. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Mar, 2012 15 commits
-
-
Pavel Emelyanov authored
Since now we have local copies of a remove FDs we can dump socket queus without entering a parasite code. This makes the code MUCH simpler. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We have two checks for fd being a chrdev: One to skip stdio-s that are termilans and The other one for any fd being a /dev/null or other special device. Clean this a little bit. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Move the preID generation from dump_one_fdinfo to make it look cleaner. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
A bugfix. Drained fds should be closed after we are done with them. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The statfs is not required, we now check for fd being a socket with S_IFSOCK. The 2nd stat is just not needed, the caller provides stat info. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
One can be read from fd_parms. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This structure is actualy an fd parameter, so put it there. This will also help with future patching. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Try meant that it might not be a socket, but with local fds we do know it for sure. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Since we're able to simply drain file descriptors we're interested in, just do that with parasite help. This changes the calling sequence a bit 1) Collect file descriptors before parasite get intected the dumpee and remember them in local copy. 2) Ask parasite to drain collected descriptrs into our space. 3) Operate with file descriptors directly via fcntl calls and such. Overall idea is to prepare ground for fowners dumping which will be addressed in further patches. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Just implemented but not yet used in dumping procedure, this will be addressed in further patches. Note the space for file descriptors is statically allocated in 8K arguments area, not on stack. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need these helpers to transfer file descriptors from dumpee to our space. Also make send_fd/recv_fd to be a wrappers over send_fds/revc_fds to not duplicate the code. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
To be able to use scm_fdset structure the two helpers added scm_fdset_init_chunk and scm_fdset_init. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This structure will serve for multiple fds transmission/receive. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need them in file descriptors transfer addressed in further patches. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need it in parasite code where we can't use libc functions. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 Mar, 2012 1 commit
-
-
Cyrill Gorcunov authored
It's unused and wrong. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 27 Mar, 2012 10 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is not good to update images while restoring. Thus, read vma_entry-es once into a list, put opened (when required) fds in there and make restorer walk the entries in mem, not those read from the image file. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
These chunks of memry, which transit into restorer code gets unmapped one-by-one and thus each of them should be page-aligned. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
There's no need in seeking file on core dump. Fix explicit sizeof(u32)-s in restore seeks. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
IOW, show family, type, state and proto as strings, not bare numbers. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Now every inetsk fd dump results in a new entry in the fdinfo.img file. Sockets itself are dumped into inetsk.img global image file. On restore the generic fdinfo redistribution algo is used and inet sockets are opened only when required. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Currently only type is taken into account, but further we will need to distinguish types as well. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-