[CRIU] Sync TODO-s for mount.c work

Pavel Emelyanov xemul at parallels.com
Tue Apr 28 10:57:34 PDT 2015


On 04/28/2015 08:48 PM, Oleg Nesterov wrote:

>> But after all the ->restore callback is only called for _new_ mounts, not
>> for external or bind.
> 
> Yes, but in this case "just MS_BIND" can't work afaics.

Well, it can, why not?

Consider you have /tmp mounted on host, when you do unshare() you
have your own copy of it, then pivot_root() goes and moves your
mountpoint into /old/tmp. If you bind mount /old/tmp into /tmp with
proper flags you got what you want. :)

But, if the --root is not there, then yes, the whole logic doesn't
work as after clean_mnt_ns() old mounts are lost and there's no way
to get them back.

-- Pavel


More information about the CRIU mailing list