- 12 Apr, 2013 5 commits
-
-
Pavel Emelyanov authored
1. Directory with images may have a "parent" symlink pointing to the place where the previous snapshot is 2. Each pagemap will have "in_parent" bit, which means, that the pages for this pagemap entry are not in the respective page.img but in parent 3. New --leave-running option to use with --snapshot not to kill tasks after snapshot Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Now we have 2 forms of storing pages -- legacy pages.img and new pagemap + pages image. We'll have one more (ovz) and the pagemap + pages will be stacked (snapshot restore). Thus it's handy to have this as an page-reader object. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The pagemap.img contains sorted iovs. Need to keep this array also sorted even if holes are in there for simpler read on restore. Separate ->write_hole callback since dump of hole and non-hole will differ significantly. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Holes are regions, that don't have pages in them (i.e. -- no pages in pipes). These holes are in separate iovs array since we should have straight arrays of iovs for non-holes, which is in turd required to push it into vmsplice in _one_ chunk. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 11 Apr, 2013 13 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Information about mount points is used for dumping fanotify. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The tcp repair manipulations require CAP_SYS_NET_ADMIN on a calling task. Thus, if the task to restore is run from non-root user, the tcp socket repair off will fail, but restoration wouldn't abort. Fix this by moving creds restore after tcp restore finish. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The fd in -> open callback is temporary (the files restoring engine will re-open one under some other fd). But since we add this fd to future repair off, this off will fail working on wrong fd. Move scheduling for repair-off into port-open where the corrent fd is known. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
The pipe retrieving shared libraries the test depends on ldd $test_path $ps_path | awk '/^\s/{ print $1 }' doesn't actually produce any output so all NS tests fail bacause the system linker fails to locate shared libraries the test program depends on. This patch fixes the pipe to retrieve the list of libraries properly. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Use a PRI* format specifier to convert an integer of known size to a string. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
@mnt_id do change on remount so exclude it from compare. Reported-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
* Call restore_ns on error paths. * Use close_safe for the socket, because it can be reused CID 996194 (#1 of 3): Resource leak (RESOURCE_LEAK) 6. leaked_handle: Handle variable "rst" going out of scope leaks the handle. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We use pr_perror, but after direct syscall calling the errno is not initialized (and in PIE it doesn't even exists). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
And simplify the code at the same time. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The constatns are in octal in all headers. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Before this patch crtools/test is bound to crtools/test/dump/crtools.XXXXXXX It's a main reason why "make clean" deletes all content from crtools/test. Always when you have a test bind mount. You have a test bind mount, when a test is executed. You execute a test sometimes. So "make clean" deletes all content sometimes;). This patch fixes this problem. Actually this patch fixes more significan problem. If / is a shared mount (it's defult in FC19), $ mount --bind crtools/test crtools/test/dump/crtools.XXXXXXX will recursively copy all previous bind mounts. E.g: cd crtools/test make -j 4 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.b86wVA ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.DMoEZv ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.b86wVA/dump/crtools-root.DMoEZv ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.oLnVTw ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.DMoEZv/dump/crtools-root.oLnVTw ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.b86wVA/dump/crtools-root.DMoEZv/dump/crtools-root.oLnVTw ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.b86wVA/dump/crtools-root.oLnVTw ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.7zQrDs ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.oLnVTw/dump/crtools-root.7zQrDs ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.DMoEZv/dump/crtools-root.oLnVTw/dump/crtools-root.7zQrDs ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.b86wVA/dump/crtools-root.DMoEZv/dump/crtools-root.oLnVTw/dump/crtools-root.7zQrDs ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.b86wVA/dump/crtools-root.oLnVTw/dump/crtools-root.7zQrDs ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.DMoEZv/dump/crtools-root.7zQrDs ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.b86wVA/dump/crtools-root.DMoEZv/dump/crtools-root.7zQrDs ext4 rw,relatime,data=ordered 0 0 /dev/mapper/vg-lv_root /root/crtools/test/dump/crtools-root.b86wVA/dump/crtools-root.7zQrDs ext4 rw,relatime,data=ordered 0 0 make -j 32 generates ~2^32 mounts. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 09 Apr, 2013 9 commits
-
-
Andrey Vagin authored
mnt_entry contains a few strings and they should be release too CID 996198 (#4 of 4): Resource leak (RESOURCE_LEAK) 20. leaked_storage: Variable "pm" going out of scope leaks the storage it points to. CID 996190 (#1 of 1): Resource leak (RESOURCE_LEAK) 13. leaked_storage: Variable "new" going out of scope leaks the storage it points to. 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>
-
Cyrill Gorcunov authored
pr_perror adds \n on its own, fix this typo. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We usually print resources IDs in hex format, so fix the places where we don't (it confuses otherwise). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 996188 (#1 of 1): Resource leak (RESOURCE_LEAK) 13. leaked_storage: Variable sd going out of scope leaks the storage it points to. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 996187 (#1 of 1): Resource leak (RESOURCE_LEAK) 10. leaked_storage: Variable "buf" going out of scope leaks the storage it points to. 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>
-
Pavel Emelyanov authored
O_RSTR flag should be used instead for regular open_image Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Will need vpid there soon, so switch to using ctl instead. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 08 Apr, 2013 6 commits
-
-
Pavel Emelyanov authored
This saves some space on stack. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We work on pid, not ctl->pid in that place. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
There's going to be a LOT of code in there. 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>
-
- 05 Apr, 2013 7 commits
-
-
Cyrill Gorcunov authored
In case if openat/open call returned fd = 0, don't forget to close it on routine exit, ie just use close_safe macro. Not a big deal since the descriptors get closed once program finish execution but still. #CID 996183 Resource leak Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It's opened in switch_ns. CID 996194 (#3 of 5): Resource leak (RESOURCE_LEAK) 11. leaked_handle: Handle variable rst going out of scope leaks the handle. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 996197 (#1 of 1): Resource leak (RESOURCE_LEAK) 8. leaked_storage: Variable ppb going out of scope leaks the storage it points to. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 996201 (#1 of 1): Resource leak (RESOURCE_LEAK) 9. leaked_handle: Handle variable "fd" going out of scope leaks the handle. CID 996202 (#1 of 1): Resource leak (RESOURCE_LEAK) 6. leaked_handle: Handle variable "fd" going out of scope leaks the handle. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 996203 (#1 of 1): Resource leak (RESOURCE_LEAK) 15. leaked_storage: Variable "vma" going out of scope leaks the storage it points to. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 996204 (#1 of 1): Resource leak (RESOURCE_LEAK) 11. leaked_storage: Variable "ch" going out of scope leaks the storage it points to. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 996205 (#1-2 of 2): Resource leak (RESOURCE_LEAK) 14. leaked_storage: Variable "core" going out of scope leaks the storage it points to. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-