[systemd-devel] Shared root fs by default

Lennart Poettering lennart at poettering.net
Fri Apr 5 09:23:35 PDT 2013


On Fri, 05.04.13 17:19, Tvrtko Ursulin (tvrtko.ursulin at onelan.co.uk) wrote:

> > Hmm, does this always happen this way, or is the MS_REC flag "sticky"
> > and causes the MNT_DETACH to be recursive?
> >
> > That looks a bit like a kernel misfeature, no?
> 
> To me it looks like the kernel is working as designed, but perhaps I am not 
> getting what exactly are you asking. You can read all the details in about 
> shared mounts and event propagation in 
> Documentation/filesystems/sharedsubtree.txt.
> 
> Use case described there is that if you clone (bind) a shared tree you need to 
> make it a slave to shut down the propagation in the backward direction (it's 
> bi-directional for shared trees by default). 

Well, but in your example you unmounted a bind mount with a child, and
that resulted in the unmounting of the child in the source mount, too --
even though you never asked for that child mount to be unmounted. That's
what your example showed, right?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list