lkml.org 
[lkml]   [2017]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Read-only `slaves` with shared subtrees?
On Mon, Sep 18, 2017 at 1:47 PM, Ram Pai <linuxram@us.ibm.com> wrote:
> It is possible to make a slave mount readonly, by remounting it with
> 'ro' flags.
>
> something like
>
> mount -o bind,remount,ro <slave-mount-dir>
>
> Any mount-propagation events reaching a read-only-slave does
> inherit the slave attribute. However it does not inherit the
> read-only attribute.

I did try manually remounting, and it worked for me. If this could be
done atomically
(which I assume can't be, in the userspace) it could even be a workaround.

> Should it inherit? or should it not? -- that has not been thought
> off AFAICT. it think we should let it inherit.

It makes sense, and it would work in my use-case. I wonder
if that would break any existing expectations though.

I could at least test such a patch, it seems like a tiny change.
Should I give it a try and submit a patch? If you could PM me any pointers
it could help a lot since I'm not familiar with FS internals. So far I got here:

http://elixir.free-electrons.com/linux/latest/source/fs/pnode.c#L294

Regards,
Dawid Ciezarkiewicz

\
 
 \ /
  Last update: 2017-09-20 01:19    [W:0.059 / U:44.788 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site