From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Miklos Szeredi <mszeredi@redhat.com>
Cc: mtk.manpages@gmail.com, lkml <linux-kernel@vger.kernel.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
Al Viro <viro@ZenIV.linux.org.uk>, Ram Pai <linuxram@us.ibm.com>
Subject: Mount namespace "dominant peer group"?
Date: Fri, 20 May 2016 16:24:18 -0500 [thread overview]
Message-ID: <f9a2bc65-9406-1b70-e0fd-b031280137d2@gmail.com> (raw)
Hello Miklos,
I'm working on some better documentation of mount namespaces,
and there's a detail that puzzles me, and I hope you might be
able to help, since you added the detail...
In Documentation/filesystems/proc.txt there is this text in the
description of /proc/PID/mountinfo:
[[
Parsers should ignore all unrecognised optional fields. Currently the
possible optional fields are:
shared:X mount is shared in peer group X
master:X mount is slave to peer group X
propagate_from:X mount is slave and receives propagation from peer group X (*)
unbindable mount is unbindable
(*) X is the closest dominant peer group under the process's root. If
X is the immediate master of the mount, or if there's no dominant peer
group under the same root, then only the "master:X" field is present
and not the "propagate_from:X" field.
]]
What is a dominant peer group, as distinct from the immediate master?
I can see in fs/proc_namespaces.c that there is this distinction made:
[[
/* Tagged fields ("foo:X" or "bar") */
if (IS_MNT_SHARED(r))
seq_printf(m, " shared:%i", r->mnt_group_id);
if (IS_MNT_SLAVE(r)) {
int master = r->mnt_master->mnt_group_id;
int dom = get_dominating_id(r, &p->root);
seq_printf(m, " master:%i", master);
if (dom && dom != master)
seq_printf(m, " propagate_from:%i", dom);
}
]]
But I can't relate that to some user-space semantics. I suppose another
way of asking my question is: how could I create a slave that is
propagating from a peer group other than it's immediate master?
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
next reply other threads:[~2016-05-20 21:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 21:24 Michael Kerrisk (man-pages) [this message]
2016-05-20 23:15 ` Ram Pai
2016-05-21 12:49 ` Michael Kerrisk (man-pages)
2016-05-23 7:55 ` Miklos Szeredi
2016-05-24 22:57 ` Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9a2bc65-9406-1b70-e0fd-b031280137d2@gmail.com \
--to=mtk.manpages@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxram@us.ibm.com \
--cc=mszeredi@redhat.com \
--cc=serge@hallyn.com \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome