Lines Matching +full:non +full:- +full:identical
1 .. SPDX-License-Identifier: GPL-2.0
11 4) Use-case
19 -----------
27 It provides the necessary building blocks for features like per-user-namespace
31 -----------
49 mount --make-shared /mnt
51 Note: mount(8) command now supports the --make-shared flag,
57 # mount --bind /mnt /tmp
60 and the contents of both the mounts remain identical.
94 # mount --make-shared /mnt
97 # mount --bind /mnt /tmp
103 # mount --make-slave /tmp
138 # mount --make-unbindable /mnt
142 # mount --bind /mnt /tmp
151 The mount command (util-linux package) can be used to set mount
154 mount --make-shared mountpoint
155 mount --make-slave mountpoint
156 mount --make-private mountpoint
157 mount --make-unbindable mountpoint
161 ------------
170 mount --bind /cdrom /cdrom
171 mount --make-shared /cdrom
189 mount --make-rshared /
194 mount --make-rslave /myprivatetree
205 C) Per-user namespace
223 mount --make-shared /
224 mount --rbind / /view/v1
225 mount --rbind / /view/v2
226 mount --rbind / /view/v3
227 mount --rbind / /view/v4
240 ---------------------
242 bind, rbind, move, mount, umount and clone-namespace operations.
270 mount --make-shared /mnt
271 mount --bind /mnt /tmp
289 mount --make-slave mount
303 peer group, and this peer-group is a slave of some other
309 mount --make-shared mount
330 -----------------------------------------------------------------------
331 | |make-shared | make-slave | make-private |make-unbindab|
332 --------------|------------|--------------|--------------|-------------|
335 |-------------|------------|--------------|--------------|-------------|
338 |-------------|------------|--------------|--------------|-------------|
341 |-------------|------------|--------------|--------------|-------------|
343 |-------------|------------|--------------|--------------|-------------|
345 ------------------------------------------------------------------------
351 ** slaving a non-shared mount has no effect on the mount.
361 mount --bind A/a B/b
369 --------------------------------------------------------------------------
372 |source(A)->| shared | private | slave | unbindable |
379 |non-shared| shared | private | slave | invalid |
389 created. This propagation tree is identical to the propagation tree of
390 'B'. And finally the peer-group of 'C' is merged with the peer group
406 'C','C1',.. 'Cn' is created. This propagation tree is identical to the
414 5. 'A' is a private mount and 'B' is a non-shared(private or slave or
418 6. 'A' is a shared mount and 'B' is a non-shared mount. A new mount 'C'
421 peer-group of 'A'.
423 7. 'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount. A
431 8. 'A' is a unbindable mount and 'B' is a non-shared mount. This is a
475 mount --move A B/b
483 ---------------------------------------------------------------------------
486 | source(A)->| shared | private | slave | unbindable |
493 |non-shared| shared | private | slave | unbindable |
513 propagation tree is created which is identical to that of
533 5. 'A' is a private mount and 'B' is a non-shared(private or slave or
536 6. 'A' is a shared mount and 'B' is a non-shared mount. The mount 'A'
540 7. 'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount.
544 8. 'A' is a unbindable mount and 'B' is a non-shared mount. The mount
569 If mount 'B' is shared, then all most-recently-mounted mounts at dentry
571 sub-mounts within them are unmounted.
582 if 'C1' is unmounted, all the mounts that are most-recently-mounted on
583 'B1' and on the mounts that 'B1' propagates-to are unmounted.
592 to be unmounted and 'C1' has some sub-mounts, the umount operation is
620 mount --bind /mnt /mnt
621 mount --make-shared /mnt
622 mount --bind /mnt /tmp
623 mount --move /tmp /mnt/1
626 Should they all be identical? or should /mnt and /mnt/1 be
627 identical only?
634 mount --make-rshared /
635 mkdir -p /v/1
636 mount --rbind / /v/1
645 mount --bind /mnt /mnt
646 mount --make-shared /mnt
647 mkdir -p /mnt/1/2/3 /mnt/1/test
648 mount --bind /mnt/1 /tmp
649 mount --make-slave /mnt
650 mount --make-shared /mnt
651 mount --bind /mnt/1/2 /tmp1
652 mount --make-slave /mnt
662 A -> B -> C
666 mount --bind /bin /tmp/test
713 mount --make-shared /root
715 mkdir -p /tmp/m1
717 mount --rbind /root /tmp/m1
736 mkdir -p /tmp/m2
737 mount --rbind /root /tmp/m2
763 mkdir -p /tmp/m3
764 mount --rbind /root /tmp/m3
769 at step i the number of vfsmounts is V[i] = i*V[i-1].
792 mount --bind /root/tmp /root/tmp
794 mount --make-rshared /root
795 mount --make-unbindable /root/tmp
797 mkdir -p /tmp/m1
799 mount --rbind /root /tmp/m1
814 mkdir -p /tmp/m2
815 mount --rbind /root /tmp/m2
830 mkdir -p /tmp/m3
831 mount --rbind /root /tmp/m3
849 * ->mnt_share
850 * ->mnt_slave_list
851 * ->mnt_slave
852 * ->mnt_master
854 ->mnt_share
858 ->mnt_slave_list
862 ->mnt_slave
866 ->mnt_master
870 ->mnt_flags
877 ->mnt_share.
879 All vfsmounts with the same ->mnt_master form on a cyclic list anchored
880 in ->mnt_master->mnt_slave_list and going through ->mnt_slave.
882 ->mnt_master can point to arbitrary (and possibly different) members
884 you need to go through _all_ ->mnt_slave_list of its members.
885 Conceptually it's just a single set - distribution among the
889 All vfsmounts in a peer group have the same ->mnt_master. If it is
890 non-NULL, they form a contiguous (ordered) segment of slave list.
897 A <--> B <--> C <---> D
901 E<-->K
911 A's ->mnt_share links with the ->mnt_share of 'B' 'C' and 'D'
913 A's ->mnt_slave_list links with ->mnt_slave of 'E', 'K', 'F' and 'G'
915 E's ->mnt_share links with ->mnt_share of K
917 'E', 'K', 'F', 'G' have their ->mnt_master point to struct vfsmount of 'A'
919 'M', 'L', 'N' have their ->mnt_master point to struct vfsmount of 'K'
921 K's ->mnt_slave_list links with ->mnt_slave of 'M', 'L' and 'N'
923 C's ->mnt_slave_list links with ->mnt_slave of 'J' and 'K'
925 J and K's ->mnt_master points to struct vfsmount of C
927 and finally D's ->mnt_slave_list links with ->mnt_slave of 'H' and 'I'
929 'H' and 'I' have their ->mnt_master pointing to struct vfsmount of 'D'.
936 ->mnt_share, ->mnt_slave, ->mnt_slave_list, ->mnt_master are protected
939 Normally we have ->mnt_flags modifications serialized by vfsmount_lock.
965 However note down its ->mnt_parent and ->mnt_mountpoint
967 is identical to the propagation tree of the destination
991 ------------------------------------------------------------------------