[CRIU] [PATCH CRIU 1/4] mount: get over autodetected mounts in search for widest shared peer

Tycho Andersen tycho.andersen at canonical.com
Thu Jan 21 16:55:59 PST 2016


On Thu, Jan 21, 2016 at 03:52:10PM -0800, Andrew Vagin wrote:
> On Thu, Jan 21, 2016 at 01:08:41AM +0300, Pavel Tikhomirov wrote:
> > 
> > 
> > On 01/20/2016 09:23 PM, Andrew Vagin wrote:
> > >On Wed, Jan 20, 2016 at 06:42:55PM +0300, Pavel Tikhomirov wrote:
> > >>now all autodetected mounts are considered to be shared - fix it
> > >
> > >I don't understand what and how you fix.
> > 
> > In collect_mnt_namespaces->resolve_external_mounts if "--ext-mount-map auto"
> > is set all mounts which are resolved external have set m->external->val =
> > "CRIU:AUTOGENERATED". Thus in dump_one_mountpoint, m->root is set to it. So
> > on restore in prepare_namespace->prepare_mnt_ns
> > ->populate_mnt_ns->validate_mounts->find_widest_shared->issubpath
> > for all external mounts we check issubpath("CRIU:AUTOGENERATED",
> > "CRIU:AUTOGENERATED") and for matched mounts check that they are equal. So
> > next in validate_shared validation fails for really different external
> > mounts. I propose to check sources for such mounts instead of roots.
> 
> It's a bad idea to rewrite m->root by CRIU:AUTOGENERATED. In this case
> we can't restore shared mounts properly.

I don't see how the two are related. It seems to me like we should be
rewriting m->root on restore when we find the matching mount, so that
subsequent checks like this don't get screwed up.

Tycho


More information about the CRIU mailing list