[CRIU] [PATCH 4/6] mnt: add --enable-external-masters option
Andrew Vagin
avagin at odin.com
Thu Apr 9 07:18:44 PDT 2015
On Wed, Apr 08, 2015 at 06:04:30PM -0600, Tycho Andersen wrote:
> > > diff --git a/mount.c b/mount.c
> > > index 8835a81..7d565d8 100644
> > > --- a/mount.c
> > > +++ b/mount.c
> > > @@ -691,6 +691,9 @@ static int resolve_external_mounts(struct mount_info *info)
> > > if (opts.enable_external_sharing && pm->shared_id == m->shared_id)
> > > match = true;
> > >
> > > + if (opts.enable_external_masters && pm->shared_id == m->master_id)
> > > + match = true;
> >
> > if think this code should be inverted:
> > if (!opts.enable_external_masters || pm->shared_id != m->master_id)
> > match = false.
> >
> > In your case, we can meet pm with another shared_id and set it as
> > external, but it looks wrong. Do I miss something?
>
> Ok, thinking about this case a bit more, if
>
> pm->shared_id != m->master_id
>
> that means the container has internal master/slave peering, but is
> from an external bind mount. This means that we would need to re-work
> do_mount_one/can_mount_now to understand external mounts in addition
> to sharing. It could be done, but since it doesn't seem like a common
> case, I'm inclined to just punt for now and print an error in this
> case. If that's ok, I think I've got the rest of the set done and I
> can post it.
Yes, It's ok.
Thanks,
Andrew
>
> Tycho
>
> > > +
> > > if (!match)
> > > continue;
> > >
> > > --
> > > 2.1.4
> > >
> > > _______________________________________________
> > > CRIU mailing list
> > > CRIU at openvz.org
> > > https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list