[CRIU] Dealing with other mount types

Tycho Andersen tycho.andersen at canonical.com
Tue Mar 31 14:12:21 PDT 2015


Hi Serge (or anyone),

On Tue, Mar 24, 2015 at 07:55:34PM +0000, Serge Hallyn wrote:
> Quoting Tycho Andersen (tycho.andersen at canonical.com):
> > 2. criu walks the mount tree as usual, and when it sees something in
> >    --slave-mount-map:
> >     1. criu bind mounts /sys/fs/pstore into $root_yard/sys/fs/pstore
> >     2. criu sets MS_SLAVE (by calling restore_shared_options())
>
> Note that depending on the new host, it may even have to first set it
> MS_SHARED, then do the bind mount, then change to MS_SLAVE.

Can you clarify what you mean here? I've written the attached patch
which on restore basically boils down to:

mount("debugfs", "./sys/kernel/debug", "debugfs", ...)

and it's giving me EINVAL:

(00.035328)      1: 95:./sys private 1 shared 0 slave 0
(00.035334)      1:   Mounting debugfs @./sys/kernel/debug (0)
(00.035337)      1: mounting debugfs ./sys/kernel/debug debugfs
(00.035364)      1: Error (mount.c:1513): Can't mount at ./sys/kernel/debug: Invalid argument

I guess probably I have to be a bit smarter about how I mount this on
restore, but I'm not exactly sure what the problem is.

Tycho
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mnt-add-support-for-external-shared-mounts.patch
Type: text/x-diff
Size: 8253 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150331/c3c42365/attachment-0001.bin>


More information about the CRIU mailing list