- 10 Apr, 2015 8 commits
-
-
Oleg Nesterov authored
Add the new mnt_entry->fsname member and change dump_one_mountpoint() to save pm->fstype->name if fstype == FSTYPE__AUTO. Change collect_mnt_from_image() to pass this ->fsname to decode_fstype() which falls back to __find_fstype_by_name(fsname, true) if FSTYPE__AUTO. Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Simple preparation to simplify the review of the next patch. Turn find_fstype_by_name(name) into __find_fstype_by_name(name, force_auto) and reimplement find_fstype_by_name() as a trivial wrapper on top. This allows "restore" to specify that this particular fsname was treated as FSTYPE__AUTO by "dump". Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
The comment in find_fstype_by_name() says: just mounting anything is wrong and this is true in general, but: almost every fs has its own features this is not true in a sense that a lot of supported filesystems do not need any special processing: FSTYPE__PROC, FSTYPE__SYSFS, and more. More importantly, this logic does not allow to spicify from the command line that (say) currently unsupported hugetlbfs can "just work", do_new_mount() should only pass the right name/options. This patch adds the new FSTYPE__AUTO code, find_fstype_by_name(name) adds the new entry if fsname_is_auto(name) returns true. We do not care that different fstype's can have the same FSTYPE__AUTO code, fstype->code has no meaning unless we need to do something special with this fs, but in this case it should not be FSTYPE__AUTO by definition. Note: currently find_fstype_by_name() just returns true, it is obviously pointless to "dump" until we teach "restore" to handle FSTYPE__AUTO. Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Preparation. Enlarge fstypes[] to make it possible to add the new fstype's dynamically. This means ths find_fstype_by_name() and decode_fstype() need the additional ->name == NULL check to terminate the search. Also change them to start with "i == 1", we rely on the fact that fstypes[0] is FSTYPE__UNSUPPORTED anyway. Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
1. If a fuse connection is present, but there are no fuse mounts of that type in the mount namespace, don't refuse to dump. 2. If there are mounts of that type in the container but they are external, we're going to bind them anyway, so there's no fuse-specific things that need to be done, so it is safe to dump. v2: check that the fstype is fuse as well Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
we don't need this check as just after it we have: if (ret) break; which safely unpackes nde, and closes nlsk and img in case of error ps: sorry for inconveniences caused by my patchset Signed-off-by:
Pavel Tikhomirov <ptikhomirov@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 09 Apr, 2015 13 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Somehow _sys_ token sneaked into __NR term. Drop it off to be close to kernel's representation. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
check it for default/lo, test values for config options are randomly generated and restricted by rand_limit changes: v2: make for all config options, avoid use of "system". v3: err->fail, run in own set of namespaces, add random, check not all options. v4: use all options because test is run in net-namespace, use ARRAY_SIZE macro v5: check fscanf and snprintf return values properly Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
because namespace default options are set before devices creation, devices will gain default options(except lo, which is created with ns). Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
restore order: 1. default 2. all 3. devices Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
In the rest of this series we need to walk all the namespaces to autodetect which mounts are master/shared/private bind mounts, so we need the information from criu's namespace in the case when the namespaces are not the same. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 07 Apr, 2015 1 commit
-
-
Saied Kazemi authored
Currently if /tmp does not exist, CRIU fails because it will not be able to create a temporary directory there. But when checkpointing and restoring containers, we cannot rely on the existence of /tmp. For such containers, we should use root (/). The temporary directory will be removed after CRIU is done. Signed-off-by:
Saied Kazemi <saied@google.com> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 06 Apr, 2015 4 commits
-
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
They both are using 'd' option in different context though, lets give them two names. 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
Man, it was almost unreadable. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 03 Apr, 2015 3 commits
-
-
Andrey Vagin authored
setns(fd, CLONE_NEWNS) resets cwd and root, so we need to restore them back. Without this patch stats-dump isn't saved in the work dir: -rw-r--r-- 1 root root 32 Apr 2 14:21 /stats-dump Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Which obviously can be used to "ignore" the mounts we do not want or need to dump. The user should know what he does. Note: this patch changes parse_mountinfo() to check should_skip_mount(). This is because imo we want to filter out the unwanted mounts asap, af if they do not exist. This increases the chances the dumping will fail if something else depends on this mount. Say, another mountpoint or an opened file. Perhaps it makes sense to teach should_skip_mount() to use fnmatch() and/or look at the optional "(fs|mnt)=" prefix to skip by fsname too. To me it would be better to force the user of this option to understand what it does. Say, if "dump" fails because the child mount can't find the skipped parent, he should add another --skip-mnt option or do not dump. Otherwise, if we do this automagically the user can probably be surpised, he might even miss the fact that we skip more than he asked. Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Preparation. 1. Add the new "bool for_dump" arg to collect/parse_mntinfo(). 2. Introduce "struct collect_mntns_arg" to pass the additional "bool for_dump" field to collect_mntinfo() and change it to pass this boolean to collect_mntinfo()->parse_mountinfo() path. 3. Change other callers of collect_mntinfo() to pass "false". Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 02 Apr, 2015 7 commits
-
-
Cyrill Gorcunov authored
They are confusing code readers. Lets save these @subtypes for Unix98 pty peers where they are really important. 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
We will need it for tty testing. Based-on-patch-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
Opening current tty is tricky: first slave peer should be opened and session restored, and only then we can open /dev/tty. So that I made rst_info to carry additional list @tty_ctty where all current ttys get gathered and opened after slave peers were brought to live. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
pty_open_unpaired_slave must be called for pty peers only and it caused no problems so far but better to be sure it's pty peer we're restoring (there gonna be more drivers with time). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This is not pty specific routine but rather a common one. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
- rename @t to @type and use protobuf constants here instead - for special features use @subtype just like kernel does - get rid of TTY_TYPE_ constants, we don't need them - drop @flags, we don't need it anymore Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 01 Apr, 2015 3 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Andrew Vagin <avagin@odin.com>
-
Cyrill Gorcunov authored
We have them in vma_entry_is_private() already. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We have two helpers for VMA type testing: privately_dump_vma() and vma_priv(). They work with different types but basically do the same: check if we should dump VMA into the image and restore it back then. Lets unify they both into common vma_entry_is_private() helper and vma_area_is_private() for working with vma_area type. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 31 Mar, 2015 1 commit
-
-
Tycho Andersen authored
For some undiagnosed reason, this test hangs for me when using SIGINT. Since we always want to kill this process anyway, use SIGKILL instead. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-