[CRIU] Sync TODO-s for mount.c work
Oleg Nesterov
oleg at redhat.com
Wed Apr 22 09:48:17 PDT 2015
Tycho,
Thanks for your answers. I feel I should not waste your time until I
try to read the docs and the code, but let me ask another question
right now.
On 04/22, Tycho Andersen wrote:
>
> On Wed, Apr 22, 2015 at 9:35 AM, Oleg Nesterov <oleg at redhat.com> wrote:
> >
> > OK, before I dive into the sources, could you please tell me what
> > should I pass as KEY:VAL pair? (I didn't read this code yet and I
> > am not sure if I can understand it, at least quickly).
>
> Looking at your mountinfo, I'm not sure you can dump this process. The
> problem is e.g.:
>
> 36 34 253:1 / / rw,relatime shared:7 master:1 - xfs
> /dev/mapper/rhel_ibm--x3650m4--02--vm--02-root
> rw,seclabel,attr2,inode64,noquota
>
> This is not a bind mount, but it has external sharing according to the
> rest of your mountinfo (there is no "shared:1" anywhere). There is no
> way to tell criu (currently) to allow mounts that aren't bind mounts
> to have sharing.
Hmm. But it fails because it can't dump the _bind_ mount?
> I guess this configuration is the result of something
> like:
>
> unshare(CLONE_NEWNS)
> mount(NULL, "/", NULL, MS_PRIVATE, NULL)
MS_SLAVE + MS_SHARED according to strace...
> so all criu needs to do is learn how to do that and it should be ok.
Let me start from the very beginning.
# unshare -m
# perl -e 'close STDIN; close STDOUT; close STDERR; sleep'
dump/restore from the root ns works.
# unshare -m
# mount --make-slave /
# mount --make-shared /
# perl -e 'close STDIN; close STDOUT; close STDERR; sleep'
dump/restore still work
# unshare -m
# mount --make-slave /
# mount --make-shared /
# mkdir /tmp/A /tmp/B
# mount --bind /tmp/A /tmp/B
# perl -e 'close STDIN; close STDOUT; close STDERR; sleep'
Now it fails with the same
Mount 35 ./tmp/B (master_id: 1 shared_id: 7) has unreachable sharing.
error message.
Why "restore" can't dump it? "restore" could simply do MS_BIND?
Oleg.
More information about the CRIU
mailing list