Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1404729

Mount namespace "dominant peer group"?

From "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Newsgroups linux.kernel
Subject Mount namespace "dominant peer group"?
Date 2016-05-20 23:30 +0200
Message-ID <rB09z-2IX-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View 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/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Mount namespace "dominant peer group"? "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-05-20 23:30 +0200
  Re: Mount namespace "dominant peer group"? Ram Pai <linuxram@us.ibm.com> - 2016-05-21 01:20 +0200
    Re: Mount namespace "dominant peer group"? "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-05-21 15:00 +0200
      Re: Mount namespace "dominant peer group"? Miklos Szeredi <mszeredi@redhat.com> - 2016-05-23 10:00 +0200
        Re: Mount namespace "dominant peer group"? "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-05-25 01:00 +0200

csiph-web