Re: [PATCH/RFC] autofs-5.1.8 - support setting mount propagation for autofs mount point.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Thu, 09 Mar 2023, Ian Kent wrote:
> On 8/3/23 13:52, NeilBrown wrote:
> > New flags in the master map:
> >    autofsshared
> >    autofsprivate
> >    autofsslave
> >
> > cause the corresponding mount propagation flags to be set on the autofs
> > mount point.  If none are specified the current behaviour of inheriting
> > from the parent unchanged.
> >
> > For example specify "autofsprivate" allows mount points to be moved
> > away from autofs using "mount -M .....".  This is not supported by the
> > kernel for the normal default of "shared".
> >
> > Better flag names should be chosen.  I would have liked to use "shared",
> > "private", and "slave", but they are already in use and only affect bind
> > mounts.
> Looks fine, I'll add it to my patch queue, can't say when I'll commit
> them though. If you need it committed sooner let me know.

No rush at all - that fact that you don't hate it is enough for now.
I was hoping you *would* hate the flag names I chose and would suggest
something better.
After pondering some more the best I can think of is

Can you think of anything better?

which could later be extended to a list of filesystem types...

My other thought is that if they autofs mount is "private" then that is
inherited to all descendants including the "bind" mounts.  So if we
changed "private" to apply to the autofs mounts rather than just the
bind mounts, then it would still affect the bind mounts as documented,
but it would affect more as well....  I guess that would end up
negatively affecting someone though...

> This takes things a bit further than I had.
> May I ask, what was the motivation for adding this?

As the commit message hints, I have a customer with a work-flow that
involves moving mount out of the automount tree with "mount -M ....".
This used to work perfectly in out SLE-11 product which didn't use
systemd and so followed the kernel default that mounts were "private" by
default.  "mount -M" only works out of parents that are private.

But with SLE-12 we use systemd, and systemd sets everything to "shared"
by default.  There are good reasons for this and the customer doesn't
want to over-ride it globally.  They just want the autofs mounts to not
be shared, so that mount -M works.
Don't ask me why they want to move mounts like this - but it doesn't
seem an unreasonable thing to want.


[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux