Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Documentation: sharedsubtree: Use proper enumerator sequence for enumerated lists

Sphinx does not recognize mixed-letter sequences (e.g. 2a) as enumerator
for enumerated lists. As such, lists that use such sequences end up as
definition lists instead.

Use proper enumeration sequences for this purpose.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819061254.31220-3-bagasdotme@gmail.com

authored by

Bagas Sanjaya and committed by
Jonathan Corbet
a8886b42 69c6739d

+20 -20
+20 -20
Documentation/filesystems/sharedsubtree.rst
··· 39 39 d. unbindable mount 40 40 41 41 42 - 2a) A shared mount can be replicated to as many mountpoints and all the 43 - replicas continue to be exactly same. 42 + a) A shared mount can be replicated to as many mountpoints and all the 43 + replicas continue to be exactly same. 44 44 45 45 Here is an example: 46 46 ··· 83 83 contents will be visible under /tmp/a too. 84 84 85 85 86 - 2b) A slave mount is like a shared mount except that mount and umount events 87 - only propagate towards it. 86 + b) A slave mount is like a shared mount except that mount and umount events 87 + only propagate towards it. 88 88 89 89 All slave mounts have a master mount which is a shared. 90 90 ··· 131 131 /mnt 132 132 133 133 134 - 2c) A private mount does not forward or receive propagation. 134 + c) A private mount does not forward or receive propagation. 135 135 136 136 This is the mount we are familiar with. Its the default type. 137 137 138 138 139 - 2d) A unbindable mount is a unbindable private mount 139 + d) A unbindable mount is a unbindable private mount 140 140 141 141 let's say we have a mount at /mnt and we make it unbindable:: 142 142 ··· 185 185 namespaces. 186 186 187 187 B) A process wants its mounts invisible to any other process, but 188 - still be able to see the other system mounts. 188 + still be able to see the other system mounts. 189 189 190 190 Solution: 191 191 ··· 250 250 Note: the word 'vfsmount' and the noun 'mount' have been used 251 251 to mean the same thing, throughout this document. 252 252 253 - 5a) Mount states 253 + a) Mount states 254 254 255 255 A given mount can be in one of the following states 256 256 ··· 360 360 the state of a mount depending on type of the destination mount. Its 361 361 explained in section 5d. 362 362 363 - 5b) Bind semantics 363 + b) Bind semantics 364 364 365 365 Consider the following command:: 366 366 ··· 437 437 8. 'A' is a unbindable mount and 'B' is a non-shared mount. This is a 438 438 invalid operation. A unbindable mount cannot be bind mounted. 439 439 440 - 5c) Rbind semantics 440 + c) Rbind semantics 441 441 442 442 rbind is same as bind. Bind replicates the specified mount. Rbind 443 443 replicates all the mounts in the tree belonging to the specified mount. ··· 474 474 475 475 476 476 477 - 5d) Move semantics 477 + d) Move semantics 478 478 479 479 Consider the following command:: 480 480 ··· 551 551 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a 552 552 unbindable mount. 553 553 554 - 5e) Mount semantics 554 + e) Mount semantics 555 555 556 556 Consider the following command:: 557 557 ··· 564 564 that the source mount is always a private mount. 565 565 566 566 567 - 5f) Unmount semantics 567 + f) Unmount semantics 568 568 569 569 Consider the following command:: 570 570 ··· 598 598 to be unmounted and 'C1' has some sub-mounts, the umount operation is 599 599 failed entirely. 600 600 601 - 5g) Clone Namespace 601 + g) Clone Namespace 602 602 603 603 A cloned namespace contains all the mounts as that of the parent 604 604 namespace. ··· 682 682 7) FAQ 683 683 ------ 684 684 685 - Q1. Why is bind mount needed? How is it different from symbolic links? 685 + 1. Why is bind mount needed? How is it different from symbolic links? 686 686 symbolic links can get stale if the destination mount gets 687 687 unmounted or moved. Bind mounts continue to exist even if the 688 688 other mount is unmounted or moved. 689 689 690 - Q2. Why can't the shared subtree be implemented using exportfs? 690 + 2. Why can't the shared subtree be implemented using exportfs? 691 691 692 692 exportfs is a heavyweight way of accomplishing part of what 693 693 shared subtree can do. I cannot imagine a way to implement the 694 694 semantics of slave mount using exportfs? 695 695 696 - Q3 Why is unbindable mount needed? 696 + 3. Why is unbindable mount needed? 697 697 698 698 Let's say we want to replicate the mount tree at multiple 699 699 locations within the same subtree. ··· 852 852 8) Implementation 853 853 ----------------- 854 854 855 - 8A) Datastructure 855 + A) Datastructure 856 856 857 857 4 new fields are introduced to struct vfsmount: 858 858 ··· 941 941 942 942 NOTE: The propagation tree is orthogonal to the mount tree. 943 943 944 - 8B Locking: 944 + B) Locking: 945 945 946 946 ->mnt_share, ->mnt_slave, ->mnt_slave_list, ->mnt_master are protected 947 947 by namespace_sem (exclusive for modifications, shared for reading). ··· 953 953 The latter holds namespace_sem and the only references to vfsmount 954 954 are in lists that can't be traversed without namespace_sem. 955 955 956 - 8C Algorithm: 956 + C) Algorithm: 957 957 958 958 The crux of the implementation resides in rbind/move operation. 959 959