[Virtio-fs] [PATCH] virtiofsd: Show submounts
Max Reitz
mreitz at redhat.com
Wed Apr 29 09:31:49 UTC 2020
On 29.04.20 10:52, Miklos Szeredi wrote:
> On Wed, Apr 29, 2020 at 10:31 AM Max Reitz <mreitz at redhat.com> wrote:
>>
>> On 28.04.20 21:15, Dr. David Alan Gilbert wrote:
>
>>> So are you saying we need a:
>>> if (mount(NULL, "/", NULL, MS_REC | MS_SHARED, NULL) < 0) {
>>>
>>> and can this go straight after (1) ?
>>
>> Isn’t MS_SHARED and MS_SLAVE mutually exclusive, that is, both are just
>> different propagation types? So shouldn’t putting this after (1) be
>> effectively the same as replacing (1)?
>
> No, think of it more like a set of groups (mounts in a group have the
> same "shared:$ID" tag in /proc/self/mountinfo) and these groups being
> arranged into a tree, where child groups get propagation from the
> parent group (mounts have a "master:$PARENT_ID" tag), but not the
> other way round.
>
> So if a mount is part of a shared group and this group is also the
> child of another shared group, then it will have both a "shared:$ID"
> and a "master:$PARENT_ID" tag in /proc/self/mountinfo.
Ah, OK.
Thanks a lot for the explanation!
> For the gory details see Documentation/filesystems/sharedsubtree.txt
Not sure whether I want to *cough* O:)
Max
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/virtio-fs/attachments/20200429/ed696587/attachment.sig>
More information about the Virtio-fs
mailing list