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
150 -----------------------
152 The mount command (util-linux package) can be used to set mount
155 mount --make-shared mountpoint
156 mount --make-slave mountpoint
157 mount --make-private mountpoint
158 mount --make-unbindable mountpoint
162 ------------
171 mount --bind /cdrom /cdrom
172 mount --make-shared /cdrom
190 mount --make-rshared /
195 mount --make-rslave /myprivatetree
206 C) Per-user namespace
224 mount --make-shared /
225 mount --rbind / /view/v1
226 mount --rbind / /view/v2
227 mount --rbind / /view/v3
228 mount --rbind / /view/v4
241 ---------------------
243 bind, rbind, move, mount, umount and clone-namespace operations.
271 mount --make-shared /mnt
272 mount --bind /mnt /tmp
290 mount --make-slave mount
304 peer group, and this peer-group is a slave of some other
310 mount --make-shared mount
331 -----------------------------------------------------------------------
332 | |make-shared | make-slave | make-private |make-unbindab|
333 --------------|------------|--------------|--------------|-------------|
336 |-------------|------------|--------------|--------------|-------------|
339 |-------------|------------|--------------|--------------|-------------|
342 |-------------|------------|--------------|--------------|-------------|
344 |-------------|------------|--------------|--------------|-------------|
346 ------------------------------------------------------------------------
352 ** slaving a non-shared mount has no effect on the mount.
362 mount --bind A/a B/b
370 --------------------------------------------------------------------------
373 |source(A)->| shared | private | slave | unbindable |
380 |non-shared| shared | private | slave | invalid |
390 created. This propagation tree is identical to the propagation tree of
391 'B'. And finally the peer-group of 'C' is merged with the peer group
407 'C','C1',.. 'Cn' is created. This propagation tree is identical to the
415 5. 'A' is a private mount and 'B' is a non-shared(private or slave or
419 6. 'A' is a shared mount and 'B' is a non-shared mount. A new mount 'C'
422 peer-group of 'A'.
424 7. 'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount. A
432 8. 'A' is a unbindable mount and 'B' is a non-shared mount. This is a
476 mount --move A B/b
484 ---------------------------------------------------------------------------
487 | source(A)->| shared | private | slave | unbindable |
494 |non-shared| shared | private | slave | unbindable |
514 propagation tree is created which is identical to that of
534 5. 'A' is a private mount and 'B' is a non-shared(private or slave or
537 6. 'A' is a shared mount and 'B' is a non-shared mount. The mount 'A'
541 7. 'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount.
545 8. 'A' is a unbindable mount and 'B' is a non-shared mount. The mount
570 If mount 'B' is shared, then all most-recently-mounted mounts at dentry
572 sub-mounts within them are unmounted.
583 if 'C1' is unmounted, all the mounts that are most-recently-mounted on
584 'B1' and on the mounts that 'B1' propagates-to are unmounted.
593 to be unmounted and 'C1' has some sub-mounts, the umount operation is
616 -------
622 mount --bind /mnt /mnt
623 mount --make-shared /mnt
624 mount --bind /mnt /tmp
625 mount --move /tmp /mnt/1
628 Should they all be identical? or should /mnt and /mnt/1 be
629 identical only?
636 mount --make-rshared /
637 mkdir -p /v/1
638 mount --rbind / /v/1
647 mount --bind /mnt /mnt
648 mount --make-shared /mnt
649 mkdir -p /mnt/1/2/3 /mnt/1/test
650 mount --bind /mnt/1 /tmp
651 mount --make-slave /mnt
652 mount --make-shared /mnt
653 mount --bind /mnt/1/2 /tmp1
654 mount --make-slave /mnt
664 A -> B -> C
668 mount --bind /bin /tmp/test
678 ------
716 mount --make-shared /root
718 mkdir -p /tmp/m1
720 mount --rbind /root /tmp/m1
739 mkdir -p /tmp/m2
740 mount --rbind /root /tmp/m2
766 mkdir -p /tmp/m3
767 mount --rbind /root /tmp/m3
772 at step i the number of vfsmounts is V[i] = i*V[i-1].
795 mount --bind /root/tmp /root/tmp
797 mount --make-rshared /root
798 mount --make-unbindable /root/tmp
800 mkdir -p /tmp/m1
802 mount --rbind /root /tmp/m1
817 mkdir -p /tmp/m2
818 mount --rbind /root /tmp/m2
833 mkdir -p /tmp/m3
834 mount --rbind /root /tmp/m3
847 -----------------
853 * ->mnt_share
854 * ->mnt_slave_list
855 * ->mnt_slave
856 * ->mnt_master
858 ->mnt_share
862 ->mnt_slave_list
866 ->mnt_slave
870 ->mnt_master
874 ->mnt_flags
881 ->mnt_share.
883 All vfsmounts with the same ->mnt_master form on a cyclic list anchored
884 in ->mnt_master->mnt_slave_list and going through ->mnt_slave.
886 ->mnt_master can point to arbitrary (and possibly different) members
888 you need to go through _all_ ->mnt_slave_list of its members.
889 Conceptually it's just a single set - distribution among the
893 All vfsmounts in a peer group have the same ->mnt_master. If it is
894 non-NULL, they form a contiguous (ordered) segment of slave list.
901 A <--> B <--> C <---> D
905 E<-->K
915 A's ->mnt_share links with the ->mnt_share of 'B' 'C' and 'D'
917 A's ->mnt_slave_list links with ->mnt_slave of 'E', 'K', 'F' and 'G'
919 E's ->mnt_share links with ->mnt_share of K
921 'E', 'K', 'F', 'G' have their ->mnt_master point to struct vfsmount of 'A'
923 'M', 'L', 'N' have their ->mnt_master point to struct vfsmount of 'K'
925 K's ->mnt_slave_list links with ->mnt_slave of 'M', 'L' and 'N'
927 C's ->mnt_slave_list links with ->mnt_slave of 'J' and 'K'
929 J and K's ->mnt_master points to struct vfsmount of C
931 and finally D's ->mnt_slave_list links with ->mnt_slave of 'H' and 'I'
933 'H' and 'I' have their ->mnt_master pointing to struct vfsmount of 'D'.
940 ->mnt_share, ->mnt_slave, ->mnt_slave_list, ->mnt_master are protected
943 Normally we have ->mnt_flags modifications serialized by vfsmount_lock.
969 However note down its ->mnt_parent and ->mnt_mountpoint
971 is identical to the propagation tree of the destination
995 ------------------------------------------------------------------------