[lxc-devel] [PATCH] Remounts bind mounts if read-only flag is provided
Michael Tokarev
mjt at tls.msk.ru
Wed Nov 19 08:08:33 UTC 2014
19.11.2014 00:04, Serge Hallyn пишет:
> Quoting Abin Shahab (ashahab at altiscale.com):
>> Bind mounts do not honor filesystem mount options. This change will remount filesystems that are bind mounted if there are changes to filesystem mount options, specifically if the mount is readonly.
>
> hi,
>
> Just to make sure I understand what you're saying,
>
> 'mount --bind -o ro /a /b' (when done through mount(2)) will not
> actually make /b readonly, so we need to do a remount in that case
> to get the -o ro to take effect at the vfsmount instead of the sb.
> Is that right?
And the way to achieve this is to add 'bind' to the remount flags
to change ro attr for the bindmount:
mount --bind -o remount,rw /a /b
mount --bind -o remount,ro /a /b
this will make vfsmount readwrite or readonly without touching
the sb.
Thanks,
/mjt
More information about the lxc-devel
mailing list