• Andrey Vagin's avatar
    mounts: find mounts, which are propagated from a current one (v2) · 02d8a72b
    Andrey Vagin authored
    A few sentences, which are required for understanging this patch
    
    2a) A shared mount can be replicated to as many mountpoints and all the
    replicas continue to be exactly same.
    2b) A slave mount is like a shared mount except that mount and umount
    events only propagate towards it.
    2c) A private mount does not forward or receive propagation.
    
    All rules is there Documentation/filesystems/sharedsubtree.txt
    
    If it's a first mount in a group, all group members should be
    bind-mounted from this one.
    
    Each mount propagates to all members of parent's group. The group can
    contains a few slaves.
    
    Mounts, which have propagated to slaves, are unmounted, because we can't
    be sure, that they propagated in real life. For example:
    
    mount --bind --make-slave /share /slave1
    mount --bind --make-slave /share /slave2
    mount /share/test
    umount /slave2/test
    mount --make-share /slave1/test
    mount --bind --make-share /slave1/test /slave2/test
    
    41 40 0:33 / /share rw,relatime shared:28 - tmpfs xxx rw
    42 40 0:33 / /slave1 rw,relatime master:28 - tmpfs xxx rw
    43 40 0:33 / /slave2 rw,relatime master:28 - tmpfs xxx rw
    44 41 0:34 / /share/test rw,relatime shared:29 - tmpfs xxx rw
    46 42 0:34 / /slave1/test rw,relatime shared:30 master:29 - tmpfs xxx rw
    45 43 0:34 / /slave2/test rw,relatime shared:30 master:29 - tmpfs xxx rw
    
    /slave1/test and /slave2/test depend on each other and minimum one of them
    doesn't propagate from /share/test
    
    v2: use false and true for bool
    Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    02d8a72b
Name
Last commit
Last update
..
asm-generic Loading commit data...
bug.h Loading commit data...
compiler.h Loading commit data...
cpu.h Loading commit data...
cr-show.h Loading commit data...
crtools.h Loading commit data...
err.h Loading commit data...
eventfd.h Loading commit data...
eventpoll.h Loading commit data...
fifo.h Loading commit data...
file-ids.h Loading commit data...
file-lock.h Loading commit data...
files-reg.h Loading commit data...
files.h Loading commit data...
fsnotify.h Loading commit data...
image-desc.h Loading commit data...
image.h Loading commit data...
inet_diag.h Loading commit data...
ipc_ns.h Loading commit data...
kcmp-ids.h Loading commit data...
kerndat.h Loading commit data...
libnetlink.h Loading commit data...
list.h Loading commit data...
lock.h Loading commit data...
log-levels.h Loading commit data...
log.h Loading commit data...
magic.h Loading commit data...
mem.h Loading commit data...
mount.h Loading commit data...
namespaces.h Loading commit data...
net.h Loading commit data...
netfilter.h Loading commit data...
netlink_diag.h Loading commit data...
packet_diag.h Loading commit data...
page-pipe.h Loading commit data...
page-read.h Loading commit data...
page-xfer.h Loading commit data...
parasite-syscall.h Loading commit data...
parasite.h Loading commit data...
pipes.h Loading commit data...
proc_parse.h Loading commit data...
protobuf-desc.h Loading commit data...
protobuf.h Loading commit data...
pstree.h Loading commit data...
ptrace.h Loading commit data...
rbtree.h Loading commit data...
restorer.h Loading commit data...
shmem.h Loading commit data...
sigframe.h Loading commit data...
signalfd.h Loading commit data...
sk-inet.h Loading commit data...
sk-packet.h Loading commit data...
sk-queue.h Loading commit data...
sockets.h Loading commit data...
stats.h Loading commit data...
string.h Loading commit data...
syscall-types.h Loading commit data...
sysctl.h Loading commit data...
tty.h Loading commit data...
tun.h Loading commit data...
unix_diag.h Loading commit data...
util-pie.h Loading commit data...
util.h Loading commit data...
uts_ns.h Loading commit data...
vdso.h Loading commit data...
xmalloc.h Loading commit data...