- 18 Dec, 2013 7 commits
-
-
Tikhomirov Pavel authored
1. add it instead of BUG_ON we should print error if warn is assigned to true 2. correct use of read_pagemap_page_from_parent, provide warn = true Signed-off-by:
Tikhomirov Pavel <snorcht@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tikhomirov Pavel authored
Signed-off-by:
Tikhomirov Pavel <snorcht@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
This test is similiar to test/rpc, and can also be used as an example of using libcriu. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
These functions are to be used to check criu, dump process and restore process. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Such constants as CR_MAX_MSG_SIZE and CR_DEFAULT_SERVICE_ADDRESS are need to be used in both service and lib. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
We need ldflags-so to link libcriu with -lprotobuf-c and rpc.pb-c.o to use RPC. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
We need it to use other dynamic libraries in libcriu. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 17 Dec, 2013 1 commit
-
-
Tikhomirov Pavel authored
when get an error reading image file need stop restore Signed-off-by:
Tikhomirov Pavel <snorcht@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 13 Dec, 2013 15 commits
-
-
Cyrill Gorcunov authored
Currently we clean up with wildchar mask. This actually not that correct. Lets remove only the files were generated by our make engine. This as well allows to clean up objects generated as $obj-e target even if the directory $obj-e is laying in doesn't have own Makefile. 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
make engine will be reworked to clean up only those files which were generated with implicit rules. Thus anything generated in specific way must be cleaned up explicitly. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Broken by 09b7b57c. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
In case criu check is run as non-root, a lot of information is printed to a user, with the only missing bit is it should run it as root. Fix it. I still don't like the fact that some other stuff is printed here, like the timestamp and the __FILE__:__LINE__, but this should be fixed separately. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
When pr_perror is used, an error message is appended with a comma and an strerror(errno), so we should not put a period at the end, otherwise we'll end up with something like this: Error: Can't bind.: Permission denied Found by git grep -w pr_perror | grep '\."' Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
There should either be a comma before the second line, or it should be in parenthesis. I chose latter. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
... to fit in a single line. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
...by rephrasing the --work-dir option description. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
We should return 1 not -1, because -1 becomes 255. This is second part, patching return from functions. Using 'ret != 0' condition seems like the best and easiest thing to do, so we expect a function to return 0 in normal case and any non-zero value in case of error. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
We should return 1 not -1, because -1 becomes 255. >From man bash: "the shell may use values above 125 specially". Don't be a black sheep and return 1. This is first part, patching obvious direct return statements. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
We should exit(1) on error, exit(0) on success. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
... and don't return -1. This is a missing part from commit 34772230. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The symlink reader reports the amount of bytes read in case of success. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 12 Dec, 2013 10 commits
-
-
Pavel Emelyanov authored
We sometimes want to exclude several tests from run. Writing expression with \-s is annoying. Let's make it possible to do several -x's instead. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We anyway build the tree, in the NS case -- few calls later. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
If we specify a new root for restore old mounts get destroyed with pivot_root + umount calls, tree umount is omitted. In this case mi-s are leaked. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Validation means -- check chat we can _restore_ this tree. Those read from proc can be in any state -- we're going to umount them (can do anything) and do path resolution (work for any knots as well). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We have a mess of uintX_t and uX usage. Drop off uintX_t ones. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Remove space before tab characters. Found by git grep ' ' (Space, Ctrl-V, Tab in shell). Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Remove whitespace at EOL (found by git grep ' $') To people using vim, I'd suggest adding the following code to ~/.vimrc: let c_space_errors = 1 highlight FormatError ctermbg=darkred guibg=darkred match FormatError /\s\+$\|\ \+\t\|\%80v.\|\ \{8\}/ Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Shawn Landden authored
Makes the criu RPC socket socket-activated with systemd [1], meaning that systemd will create and listen to the UNIX socket /var/run/criu-srvice.socket on behalf of criu until a connection comes in, when it will then pass control of the socket, along with the first connection over to a newly spawned criu daemon. This is similar to inetd, but criu stays around after getting started, listening itsself on the socket. [1] http://0pointer.de/blog/projects/socket-activation.html v2: stripped down sd-daemon.[ch] moved units to scripts/sd v3: stripped down further by removing unneeded includes Signed-off-by:
Shawn Landden <shawn@churchofgit.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is more correct, as if st_dev == phys_dev check fails we have to treat phys_dev as kdev for path resolve device comparison. Howver, this is not the case for non-btrfs FSs, and for the latter one doesn't change anything as it uses anon devices which are equal for kdev and odev cases. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
When dumping a ghost file we put real device in its header, not the (btrfs) virtual one. This is done since we put real devices into fsnotify images (we get them from proc). That said on fsnotify ghost restore we don't need to do path resolution, just devices compare. And one more thing. When dumping device for ghost file for _non_ btrfs case we have to convert stat dev_t into kernel dev_t as all the other places in criu manipulate the latter ones. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 11 Dec, 2013 7 commits
-
-
Andrew Vagin authored
It's used by phys_stat_resolve_dev (broken by c5d2386a) Signed-off-by:
Andrew Vagin <avagin@openvz.org> 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>
-
Pavel Emelyanov authored
Now we have more robust and fs agnostic path-resolution engine for resolving dev conflicts. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Instead of scanning btrfs subvolumes (which can be even unaccessbile if mount point lays on directory instead of subvolume itself) we use path resolving feature here -- once we need to figure out if some device number need to be altered up to mount point (as we know stat() called on subvolume returns st_dev for subvolume itself, but not one that associated with a superblock and shown in /proc/self/mountinfo output). This as well implies that we need to check if device number for ghost files are to be updated to match mountinfo, thus we use phys_stat_resolve_dev helper here. After this patch the previously merged btrfs engine is no longer needed (at least it seems so) and can be dropped. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This routine is aimed to find a mount point on which the path passed as argument is laying on. We walk over all mount points and see which one is matching. Once found (in worst case it will be a root mount point so function is never failing) we're checking if this is btrfs and then return subvolume0 device id. See commit 921cf873 for details what the hell we're doing here. v2: rewrite mount_resolve_path w/o recursion Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
For paths resolution we will need mount tree to be parsed and built, but it's not that simple -- the current code implies that once parsed the tree must not be re-parsed again, so we pass @parse argument from a caller: if a task we're restoring do not use mount namespace, we should parse mount tree early, otherwise defer this action until mount tree is read from the image. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-