Thread (13 messages) flat view 13 messages, 4 authors, 2018-01-19

Re: User-visible context-mount API

From: David Howells <hidden>
Date: 2018-01-16 14:18:32
Also in: linux-fsdevel

Miklos Szeredi [off-list ref] wrote:
quoted
Maybe - the problem is that it's harder to manage if you've got multiple
mounts attached to a single superblock as you can only change the superblock
state if all the mounts are R/O.
Not true:

 [root@veci ~]# cat /proc/self/mountinfo | grep 46
212 78 0:46 / /tmp/1 rw,relatime shared:153 - tmpfs tmpfs rw,seclabel
219 78 0:46 / /tmp/2 rw,relatime shared:153 - tmpfs tmpfs rw,seclabel
[root@veci ~]# mount -oremount,ro /tmp/1
[root@veci ~]# cat /proc/self/mountinfo | grep 46
212 78 0:46 / /tmp/1 ro,relatime shared:153 - tmpfs tmpfs ro,seclabel
219 78 0:46 / /tmp/2 rw,relatime shared:153 - tmpfs tmpfs ro,seclabel
[root@veci ~]# mount -oremount,bind,rw /tmp/1
[root@veci ~]# cat /proc/self/mountinfo | grep 46
212 78 0:46 / /tmp/1 rw,relatime shared:153 - tmpfs tmpfs ro,seclabel
219 78 0:46 / /tmp/2 rw,relatime shared:153 - tmpfs tmpfs ro,seclabel
[root@veci ~]#

R/O flag on mount and on superblock can be changed independently.
Ah...  I misread the code.  I was looking at the check that there are no
writers on a mount.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help