[Devel] [PATCH rh7 v2] ve/devpts: Support per-VE mount namespace
Vladimir Davydov
vdavydov at parallels.com
Wed Jul 22 06:31:26 PDT 2015
On Wed, Jul 22, 2015 at 04:11:27PM +0300, Cyrill Gorcunov wrote:
> On Wed, Jul 22, 2015 at 03:48:33PM +0300, Vladimir Davydov wrote:
> > You just add this:
> >
> > if (opts.newinstance)
> > s = sget(fs_type, NULL, set_anon_super, flags, NULL);
> > else
> > root = mount_ns(fs_type, flags, data, get_exec_env(), devpts_fill_super);
> > s = sget(fs_type, compare_init_pts_sb, set_anon_super, flags,
> > NULL);
> >
> > Then if there is no ve->devpts_sb, you will get a new super block, no
> > matter if newinstance is passed or not. Then you set devpts_sb. Any
> > following mount will return:
> >
> > - w/o instance - devpts_sb
> > - with newinstance - a new super block
> >
> > And you don't need any hacks. Why will this not work?
>
> Wait, in the code above if @opts.newinstance = 1 we allocate
> new superblock, and that's the problem: on restore we
> pass @opts.newinstance = 1 for container devtps mount
> and instaed of using ve->devpts_sb we'll get new
But ve->devpts_sb isn't supposed to exist yet, is it? CRIU does the
first devpts mount, which is going to be the default one for the VE, and
sets ve->devpts_sb to point to it.
> superblock here. How the code above would prevent this?
> What I'm missing here?
More information about the Devel
mailing list