[CRIU] [PATCH 2/2] mnt: Update can_mount_now to test if master peer is ready
Cyrill Gorcunov
gorcunov at gmail.com
Fri Oct 9 01:34:27 PDT 2015
On Fri, Oct 09, 2015 at 11:28:17AM +0300, Andrew Vagin wrote:
> On Thu, Oct 08, 2015 at 10:45:55PM +0300, Cyrill Gorcunov wrote:
> > If we're in someone's slave list we have to wait until
> > master peer is mounted before mounting ourself otherwise
> > we ruin the master/slave order.
> >
> > https://jira.sw.ru/browse/PSBM-39957
> >
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> > mount.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/mount.c b/mount.c
> > index 52cb8a1766d0..f99bce414cff 100644
> > --- a/mount.c
> > +++ b/mount.c
> > @@ -2126,6 +2126,12 @@ static bool can_mount_now(struct mount_info *mi)
> >
> > if (mi->external)
> > return true;
> > + /*
> > + * We're in someone's slave list so wait
> > + * until master peer is mounted.
> > + */
> > + if (mi->mnt_master && mi->mnt_master->mounted == false)
> > + return false;
>
> mi->bind is set for slave mounts only if a master mount is mounted,
> so this patch do nothing.
not at all. please read resolve_shared_mounts: the @bind is
set for entries which _are_ simply bindmounted, it doesn't
care about master/slave relationship (which is aimed separately
via mnt_slave_list, mnt_shared)
More information about the CRIU
mailing list