Messages in this thread | | | From | Dawid Ciezarkiewicz <> | Date | Tue, 19 Sep 2017 16:18:02 -0700 | Subject | Re: 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
| |