- 12 Dec, 2013 7 commits
-
-
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 8 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>
-
Cyrill Gorcunov authored
This variable should be carrying root of a parsed mount tree pointed by @mntinfo. Thus if @mntinfo get destroyed the @mntinfo_root should be set to NULL. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 05 Dec, 2013 3 commits
-
-
Cyrill Gorcunov authored
If mount point is not a subvolume we need more complex logic to figure out which subvolumes it might have. It'll be addressed later, at moment simply don't fail in such case: for worst scenarion we will fail later in CRIU code when devs are not matching, in best case if application is not using notify, sockets or deleted files -- we should continue without errors. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Subvolume 0 has own device number as well, don't miss it when looking up for match. 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>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 04 Dec, 2013 10 commits
-
-
Pavel Emelyanov authored
And make use of it in for btrfs. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
We will need to parse btrfs stuff, but this one is not in the supported list yet (as it's bound to hardware). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
In case if ghost file is on BTRFS subvolume we should not fail but test if there is a match. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Because socket migh lay on btrfs volume (thus the device number reported by diag module won't be the same as obtained from stat(2)) we need to do an additional test and try to resolve device number with help of btrfs engine. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This helper serves to hide fs specifics (in particular btrfs) thus the caller won't need the details. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This helper will cause BTRFS engine to collect all subvolumes. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It is been found that BTRFS uses per subvolume device numbering scheme which causes some of our tests to fail if they are laying on this filesystem. Here we introduce minimal engine which parses subvolumes present on mount point. The interface is two functions - btrfs_parse_mountinfo: this one parses subvolume and caches the results - is_btrfs_subvol: test if device id is laying on subvolume In the code we assume that cpu we're running on is little endian, thus if one day we run on big ending machine the code must be updated accordingly. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It will hold auxiliary data associated with mount point. We will use it for btrfs handling but in future it can be extended. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need it for btrfs handling. Also print out the FS type for easier debug | (00.003545) type unsupported (cgroup) source cgroup 1c / @ /sys/fs/cgroup/blkio flags 30000e options blkio, | (00.003558) type unsupported (cgroup) source cgroup 1d / @ /sys/fs/cgroup/perf_event flags 30000e options perf_event, | (00.003571) type unsupported (cgroup) source cgroup 1e / @ /sys/fs/cgroup/hugetlb flags 30000e options hugetlb, | (00.003584) type unsupported (ext4) source /dev/sda2 800002 / @ / flags 300000 options data=ordered, | (00.003670) type tmpfs (tmpfs) source tmpfs 20 / @ /tmp flags 100000 options | (00.003696) type unsupported (mqueue) source mqueue d / @ /dev/mqueue flags 300000 options Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
@path is always nil here, we actually need @remap->path Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 03 Dec, 2013 4 commits
-
-
Cyrill Gorcunov authored
For debug purpose. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We allocate mount_info with xzalloc, no need for additional NULL assignment. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
If we fail in xmalloc the function occasionally return 0 meaning that everything is fine. Don't do that, wait until routine complete. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
First thing people typically do with criu is run something in shell and try to dump it. This is typicall pitfall, as in that case we face external sid and tty problem. Print a message on stdout about this and advice wiki page to read. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 02 Dec, 2013 2 commits
-
-
Ruslan Kuprieiev authored
Currently we have a bug: if no leave_running is set in request, service won't send dump response. We must not send response only if it was a self-dump request and no leave_running option was set. Signed-off-by:
Ruslan Kuprieiev <kupruser@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>
-
- 29 Nov, 2013 2 commits
-
-
Cyrill Gorcunov authored
We will need it for additional handling once parsing of mount entry is complete (in particular btrfs requires additional processing to figure out subvolumes names). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need it for btrfs subvolumes handling. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 Nov, 2013 3 commits
-
-
Cyrill Gorcunov authored
It's designed specificly for that. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The error message is rather confusing people. In worst case (if it happened that we need this uncollected socket), criu will print out real error message later. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Useful for bug hunting. | (00.005209) unix: Dropping path /mnt/disk1/new_subvol/criu/test/zdtm/live/static/sockets00.test | for unlinked bound sk 0x26.0x1d4e real 0x23.0x1d4e Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 25 Nov, 2013 1 commit
-
-
Pavel Emelyanov authored
The next version is ready. It looks like it's time to make it be the first major release, so here it is -- the v1.0. It's as functional as v0.8 but with a lot of bug fixes and improvements. And it's still :) compatible wrt images and cli options with older criu-s. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-