[CRIU] Fake mount points in dump

Stanislav Kinsburskiу skinsbursky at odin.com
Thu Jan 21 02:42:15 PST 2016


21 янв. 2016 г. 11:26 AM пользователь Pavel Emelyanov <xemul at parallels.com> написал:
>
> On 01/20/2016 04:41 PM, Stanislav Kinsburskiy wrote: 
> > 
> > 
> > 20.01.2016 14:24, Pavel Emelyanov пишет: 
> >> On 01/20/2016 04:16 PM, Stanislav Kinsburskiу wrote: 
> >>> 20 янв. 2016 г. 14:08 пользователь Pavel Emelyanov <xemul at parallels.com> написал: 
> >>>> 
> >>>>>> It is. Check the /proc/pid/mountinfo files themselves, maybe the mp just 
> >>>>>> got propagated from host to container or vice versa. 
> >>>>> I think the problem is much simpler. 
> >>>>> Autofs uses "parse" callback for early check, whether it can be dumped 
> >>>>> (checking pipe status). 
> >>>>> The intention was to detect unsupported mounts early. But looks like 
> >>>>> "parse" doesn't suit this role, because it's called for for host mounts. 
> >>>>> What was the reason behind this callback? 
> >>>> Parsing fs-specific options. 
> >>>> 
> >>> Why it can't be done, say, on dump stage? 
> >> Pardon? The fstype->parse() is called on dump stage, isn't it? 
> > 
> > Not really. 
> > It's also called on check and restore stages. 
>
> That's side effect. On check it's likely not needed, on restore 
> it's called to get criu's mountpoints for ... hm ... for ... IIRC 
> for fsnotifies, but in case of mntns restore it is not called for 
> criu mntns (shouldn't be called). 
>

I don't really get it, but ok. Looks like it's needed.

> >>> What was the reason to invent one more callback? 
> >> One more additionally to which? 
> > 
> > In addition to dump callback. 
> > Why it was required to add "parse" callback and parse options there 
> > instead of parsing them in "dump" callback? 
>
> Because we parse /proc/mountinfo in advance and re-parsing it at 
> dump time slows things down. It's better to get everything we need 
> in one go. 
>

Then, probably, "parse" callback is a wrong place to use for autofs checks.
I can move it back to dump stage, or introduce one more "predump" callback, which will be aimed to check, whether mount point can be migrated or not. It will be called _only_ for "dump" (and maybe "check", if you would wish) stages.
And would be nice to make some decision regarding autofs series.
Please, note, that the feature is urgent and from my POW it would be nice to postpone any architectural changes, because right now I'm focused on NFS migration.

> -- Pavel 



More information about the CRIU mailing list