- 04 May, 2012 12 commits
-
-
Pavel Emelyanov authored
Reg files are those obtained by open() syscall on restore. Pipes should be checked to belong to pipefs (fifos are not supported yet). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Funny, but kernel reports some of them with []-s and some (well, ok, inotofy only) without... 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
v2: - open_mount is cleaned up - byte-stream hex conversion remains untouched since strtol is flipping numbers to LE manner Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
At moment only open_mnt_root is there, which is needed for inotify restore. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
To restore inotify we need to know the mount point device numbers, so this helper parses /proc/pid/mountinfo file for that. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Need it for inotify restore. 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>
-
Cyrill Gorcunov authored
v2: - Move everything into eventpoll.[ch] - Use rst_file_params 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>
-
Cyrill Gorcunov authored
v2: - Pass initial counter value to eventfd call (can't pass flags here since they are obtained with fcntl and must be restored same way or restore will fail) - Use rst_file_params for flags and owner restore - Use eventfd.[ch] instead of eventfs.[ch] - Move show funcs to eventfd.c Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Will need it for eventpoll/eventfd/inotify. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 03 May, 2012 9 commits
-
-
Pavel Emelyanov authored
This is also a code move plus two changes: * shmems renamed to dump_shmems * shmem area size is shared with restorer (it's one page for both for now) Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
No changes, just code move (and rename of shmems variable). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Just a codemove, no real changed. 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
Also convert all ino into %x format. 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
We use mincore to check which pages we should take with us into the image. The anonymour present or swapped should go, file present but not cow-ed should not. The mincore syscall wasn't very helpful with this -- it didn't detect swap, but did detect some non present pages (pagecache). Plus it didn't know anything about cow-ing filemaps. Andrey Morton suggested to use the pagemap file in proc, but it lacked the importaint stuff -- the cow filemap bit. Now it's there and we can switch to using it. The mincore usage for shared memory is still there, as for _that_ case it's correct. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Dumped pages are those taken to the image Skipped pages are those, sitting in RAM, but left there (file shared pages) Total is the total amount of pages that fit into vmarea Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Apr, 2012 4 commits
-
-
Pavel Emelyanov authored
* Split dump/restore options from show ones * Structure the former list * Add the --tcp-established one Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The wrong descriptor was passed to the read_img_buf. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Calculate the best width for address and print them all with it. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 03 May, 2012 2 commits
-
-
Andrey Vagin authored
A few of our functions use buffer and string functions. All these functions require that a string contains '\0' at the end. Before this patch we didn't guarantee that. I've seen segmentation fault in parse_pid_stat_small. v2: simplify code v3: remove assignment, because it's redundant and a size of object file become bigger. Signed-off-by:
Andrey Vagin <avagin@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>
-
- 28 Apr, 2012 11 commits
-
-
Pavel Emelyanov authored
This test is very basic :( Need more work on it. One note about --close arg to crtools -- bash leaves all fds open when laucnhing progams, and for restore this is critical, as one of them can be busy. Iterating over all the possibel fds and closing them is "do not want" thing. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Only manual mode at the moment. Need to automate it later. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
What it does is uses the tcp repair engine from the kernel. On dump the connection is locked with netfilter, socket is put in the repair state and then its internals are dumped. On restore we create a socket, put it into repair, dress it up and then unlock all the connections at the very end. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
When dump finished with error we should unlock all locked previously connections. When restoring we should collect connctions and unlock them all at the end. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Introduce the image file for tcp info, its entry and the show method. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Between dump and restore of a tcp conn we have to keep the connection blocked, since the socket doesn't exists in the kernel at this time and any packet from peer will result in RST. Thus, add the -j DROP rule for every connection we're about to repair. Later, when we support containers, this will be extended to stop the whole networking in a CT instead of cherry-peeking connections. It does system("iptables ...") for this, but I'd prefer using the libnetfilter-devel sometime in the future. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
First of all -- to make crtools dump/restore established tcp sockets you have to specify the --tcp-established options. By doing so you inform crtools that a) you know, that after dump there will be a netfilter rules blocking the dumped connections b) you guarantee, that before restore this netfilter block is still there What else this patch does is simple -- collects establised sockets and calls the dump/restore tcp function (now empty) where appropriate. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Just a codemove. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
After reopen_fd_as the original fd is closed. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 26 Apr, 2012 2 commits
-
-
Pavel Emelyanov authored
Funny, but after this git thinks, that I've renamed the sockets.c file into sk-unix.c one and fixed it a little bit %) Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
For simpler unix socket code move. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-