Re: Change in behaviour when unmounting recursive bind mounts

From: Tvrtko Ursulin
Date: Thu Mar 28 2013 - 12:30:16 EST


On Thursday 28 March 2013 23:35:49 Ram Pai wrote:
> On Thu, Mar 28, 2013 at 01:05:56PM +0000, Tvrtko Ursulin wrote:
> > Hi,
> >
> > On Thursday 28 March 2013 11:03:51 Ram Pai wrote:
> > > I tried these commands on a 3.8.0-rc1+ kernel and did not find the
> > > problem. Is this on a recent kernel?
> >
> > I am on Fedora 17 latest, but I've seen this problem with different
> > kernels. Pretty sure from 3.5 something to 3.8 something. All Fedora
> > flavoured. I will try vanilla soon.
> >
> > What I am not sure is whether this behaviour was there from the start (on
> > Fedora 17). I *think* it started to happen later on, which would mean a
> > potential userland change somehow causes it.
> >
> > Would that be at all possible with some mechanism?
> >
> > > > Previously unmounting the recursive bind target would not unmount the
> > > > source, which to me looks like a more sensible outcome.
> > >
> > > yes. it should not unless they are peer-mounts, which in your case is
> > > not.
> >
> > What are these and how to create them?
>
> These are mounts that are created by marking mount as shared, followed
> by bind mount, followed by submount and then unmount.
>
> Documentation/filesystem/sharedsubtree.txt has the details.

Knowing the right keywords certainly enabled me to hunt it down, thanks!

Culprit is systemd as per following commit:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=b3ac5f8cb98757416d8660023d6564a7c411f0a0

Regards,

Tvrtko

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/