sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget-/translations/zh_CN/filesystems/sharedsubtreemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/zh_TW/filesystems/sharedsubtreemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/it_IT/filesystems/sharedsubtreemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ja_JP/filesystems/sharedsubtreemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ko_KR/filesystems/sharedsubtreemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/sp_SP/filesystems/sharedsubtreemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhG/var/lib/git/docbuild/linux/Documentation/filesystems/sharedsubtree.rsthKubhsection)}(hhh](htitle)}(hShared Subtreesh]hShared Subtrees}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(h|Contents: 1) Overview 2) Features 3) Setting mount states 4) Use-case 5) Detailed semantics 6) Quiz 7) FAQ 8) Implementationh]h|Contents: 1) Overview 2) Features 3) Setting mount states 4) Use-case 5) Detailed semantics 6) Quiz 7) FAQ 8) Implementation}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubh)}(hhh](h)}(h 1) Overviewh]h 1) Overview}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(h!Consider the following situation:h]h!Consider the following situation:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hA process wants to clone its own namespace, but still wants to access the CD that got mounted recently. Shared subtree semantics provide the necessary mechanism to accomplish the above.h]hA process wants to clone its own namespace, but still wants to access the CD that got mounted recently. Shared subtree semantics provide the necessary mechanism to accomplish the above.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhIt provides the necessary building blocks for features like per-user-namespace and versioned filesystem.h]hhIt provides the necessary building blocks for features like per-user-namespace and versioned filesystem.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]overviewah ]h"] 1) overviewah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h 2) Featuresh]h 2) Features}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXShared subtree provides four different flavors of mounts; struct vfsmount to be precise:h]hXShared subtree provides four different flavors of mounts; struct vfsmount to be precise:}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjhhubhenumerated_list)}(hhh](h list_item)}(hXXA **shared mount** can be replicated to as many mountpoints and all the replicas continue to be exactly same. Here is an example: Let's say /mnt has a mount that is shared:: # mount --make-shared /mnt .. note:: mount(8) command now supports the --make-shared flag, so the sample 'smount' program is no longer needed and has been removed. :: # mount --bind /mnt /tmp The above command replicates the mount at /mnt to the mountpoint /tmp and the contents of both the mounts remain identical. :: #ls /mnt a b c #ls /tmp a b c Now let's say we mount a device at /tmp/a:: # mount /dev/sd0 /tmp/a # ls /tmp/a t1 t2 t3 # ls /mnt/a t1 t2 t3 Note that the mount has propagated to the mount at /mnt as well. And the same is true even when /dev/sd0 is mounted on /mnt/a. The contents will be visible under /tmp/a too. h](h)}(hmA **shared mount** can be replicated to as many mountpoints and all the replicas continue to be exactly same.h](hA }(hjFhhhNhNubhstrong)}(h**shared mount**h]h shared mount}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjFubh[ can be replicated to as many mountpoints and all the replicas continue to be exactly same.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK%hjBubh)}(hHere is an example:h]hHere is an example:}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjBubh)}(h+Let's say /mnt has a mount that is shared::h]h,Let’s say /mnt has a mount that is shared:}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjBubh literal_block)}(h# mount --make-shared /mnth]h# mount --make-shared /mnt}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhK,hjBubhnote)}(h~mount(8) command now supports the --make-shared flag, so the sample 'smount' program is no longer needed and has been removed.h]h)}(h~mount(8) command now supports the --make-shared flag, so the sample 'smount' program is no longer needed and has been removed.h]hmount(8) command now supports the --make-shared flag, so the sample ‘smount’ program is no longer needed and has been removed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjBubj)}(h# mount --bind /mnt /tmph]h# mount --bind /mnt /tmp}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhK5hjBubh)}(h{The above command replicates the mount at /mnt to the mountpoint /tmp and the contents of both the mounts remain identical.h]h{The above command replicates the mount at /mnt to the mountpoint /tmp and the contents of both the mounts remain identical.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjBubj)}(h#ls /mnt a b c #ls /tmp a b ch]h#ls /mnt a b c #ls /tmp a b c}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKlet’s say we have a mount at /mnt and we make it unbindable:}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJubj)}(h# mount --make-unbindable /mnth]h# mount --make-unbindable /mnt}hj|sbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjJubh)}(h3Let's try to bind mount this mount somewhere else::h]h4Let’s try to bind mount this mount somewhere else:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJubj)}(hs# mount --bind /mnt /tmp mount: wrong fs type, bad option, bad superblock on /mnt, or too many mounted file systemsh]hs# mount --bind /mnt /tmp mount: wrong fs type, bad option, bad superblock on /mnt, or too many mounted file systems}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjJubh)}(h2Binding a unbindable mount is a invalid operation.h]h2Binding a unbindable mount is a invalid operation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJubeh}(h]h ]h"]h$]h&]uh1j@hj=hhhhhNubeh}(h]h ]h"]h$]h&]enumtype loweralphaprefixhsuffix)uh1j;hjhhhhhK%ubeh}(h]featuresah ]h"] 2) featuresah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h3) Setting mount statesh]h3) Setting mount states}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hHThe mount command (util-linux package) can be used to set mount states::h]hGThe mount command (util-linux package) can be used to set mount states:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hmount --make-shared mountpoint mount --make-slave mountpoint mount --make-private mountpoint mount --make-unbindable mountpointh]hmount --make-shared mountpoint mount --make-slave mountpoint mount --make-private mountpoint mount --make-unbindable mountpoint}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubeh}(h]setting-mount-statesah ]h"]3) setting mount statesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h 4) Use casesh]h 4) Use cases}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj<)}(hhh](jA)}(hXA process wants to clone its own namespace, but still wants to access the CD that got mounted recently. Solution: The system administrator can make the mount at /cdrom shared:: mount --bind /cdrom /cdrom mount --make-shared /cdrom Now any process that clones off a new namespace will have a mount at /cdrom which is a replica of the same mount in the parent namespace. So when a CD is inserted and mounted at /cdrom that mount gets propagated to the other mount at /cdrom in all the other clone namespaces. h](h)}(hgA process wants to clone its own namespace, but still wants to access the CD that got mounted recently.h]hgA process wants to clone its own namespace, but still wants to access the CD that got mounted recently.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h Solution:h]h Solution:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h>The system administrator can make the mount at /cdrom shared::h]h=The system administrator can make the mount at /cdrom shared:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h5mount --bind /cdrom /cdrom mount --make-shared /cdromh]h5mount --bind /cdrom /cdrom mount --make-shared /cdrom}hjDsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjubh)}(hNow any process that clones off a new namespace will have a mount at /cdrom which is a replica of the same mount in the parent namespace.h]hNow any process that clones off a new namespace will have a mount at /cdrom which is a replica of the same mount in the parent namespace.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hSo when a CD is inserted and mounted at /cdrom that mount gets propagated to the other mount at /cdrom in all the other clone namespaces.h]hSo when a CD is inserted and mounted at /cdrom that mount gets propagated to the other mount at /cdrom in all the other clone namespaces.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubjA)}(hXAA process wants its mounts invisible to any other process, but still be able to see the other system mounts. Solution: To begin with, the administrator can mark the entire mount tree as shareable:: mount --make-rshared / A new process can clone off a new namespace. And mark some part of its namespace as slave:: mount --make-rslave /myprivatetree Hence forth any mounts within the /myprivatetree done by the process will not show up in any other namespace. However mounts done in the parent namespace under /myprivatetree still shows up in the process's namespace. h](h)}(hlA process wants its mounts invisible to any other process, but still be able to see the other system mounts.h]hlA process wants its mounts invisible to any other process, but still be able to see the other system mounts.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjtubh)}(h Solution:h]h Solution:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjtubh)}(hNTo begin with, the administrator can mark the entire mount tree as shareable::h]hMTo begin with, the administrator can mark the entire mount tree as shareable:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjtubj)}(hmount --make-rshared /h]hmount --make-rshared /}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjtubh)}(h[A new process can clone off a new namespace. And mark some part of its namespace as slave::h]hZA new process can clone off a new namespace. And mark some part of its namespace as slave:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjtubj)}(h"mount --make-rslave /myprivatetreeh]h"mount --make-rslave /myprivatetree}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjtubh)}(hHence forth any mounts within the /myprivatetree done by the process will not show up in any other namespace. However mounts done in the parent namespace under /myprivatetree still shows up in the process's namespace.h]hHence forth any mounts within the /myprivatetree done by the process will not show up in any other namespace. However mounts done in the parent namespace under /myprivatetree still shows up in the process’s namespace.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjtubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubeh}(h]h ]h"]h$]h&]j upperalphajhjjuh1j;hjhhhhhKubh)}(hiApart from the above semantics this feature provides the building blocks to solve the following problems:h]hiApart from the above semantics this feature provides the building blocks to solve the following problems:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj<)}(hhh](jA)}(hXmPer-user namespace The above semantics allows a way to share mounts across namespaces. But namespaces are associated with processes. If namespaces are made first class objects with user API to associate/disassociate a namespace with userid, then each user could have his/her own namespace and tailor it to his/her requirements. This needs to be supported in PAM. h](h)}(hPer-user namespaceh]hPer-user namespace}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXXThe above semantics allows a way to share mounts across namespaces. But namespaces are associated with processes. If namespaces are made first class objects with user API to associate/disassociate a namespace with userid, then each user could have his/her own namespace and tailor it to his/her requirements. This needs to be supported in PAM.h]hXXThe above semantics allows a way to share mounts across namespaces. But namespaces are associated with processes. If namespaces are made first class objects with user API to associate/disassociate a namespace with userid, then each user could have his/her own namespace and tailor it to his/her requirements. This needs to be supported in PAM.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubjA)}(hXVersioned files If the entire mount tree is visible at multiple locations, then an underlying versioning file system can return different versions of the file depending on the path used to access that file. An example is:: mount --make-shared / mount --rbind / /view/v1 mount --rbind / /view/v2 mount --rbind / /view/v3 mount --rbind / /view/v4 and if /usr has a versioning filesystem mounted, then that mount appears at /view/v1/usr, /view/v2/usr, /view/v3/usr and /view/v4/usr too A user can request v3 version of the file /usr/fs/namespace.c by accessing /view/v3/usr/fs/namespace.c . The underlying versioning filesystem can then decipher that v3 version of the filesystem is being requested and return the corresponding inode. h](h)}(hVersioned filesh]hVersioned files}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hIf the entire mount tree is visible at multiple locations, then an underlying versioning file system can return different versions of the file depending on the path used to access that file.h]hIf the entire mount tree is visible at multiple locations, then an underlying versioning file system can return different versions of the file depending on the path used to access that file.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hAn example is::h]hAn example is:}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hymount --make-shared / mount --rbind / /view/v1 mount --rbind / /view/v2 mount --rbind / /view/v3 mount --rbind / /view/v4h]hymount --make-shared / mount --rbind / /view/v1 mount --rbind / /view/v2 mount --rbind / /view/v3 mount --rbind / /view/v4}hjLsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjubh)}(hand if /usr has a versioning filesystem mounted, then that mount appears at /view/v1/usr, /view/v2/usr, /view/v3/usr and /view/v4/usr tooh]hand if /usr has a versioning filesystem mounted, then that mount appears at /view/v1/usr, /view/v2/usr, /view/v3/usr and /view/v4/usr too}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hA user can request v3 version of the file /usr/fs/namespace.c by accessing /view/v3/usr/fs/namespace.c . The underlying versioning filesystem can then decipher that v3 version of the filesystem is being requested and return the corresponding inode.h]hA user can request v3 version of the file /usr/fs/namespace.c by accessing /view/v3/usr/fs/namespace.c . The underlying versioning filesystem can then decipher that v3 version of the filesystem is being requested and return the corresponding inode.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjstartKuh1j;hjhhhhhKubeh}(h] use-casesah ]h"] 4) use casesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h5) Detailed semanticsh]h5) Detailed semantics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(huThe section below explains the detailed semantics of bind, rbind, move, mount, umount and clone-namespace operations.h]huThe section below explains the detailed semantics of bind, rbind, move, mount, umount and clone-namespace operations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hithe word 'vfsmount' and the noun 'mount' have been used to mean the same thing, throughout this document.h]h)}(hithe word 'vfsmount' and the noun 'mount' have been used to mean the same thing, throughout this document.h]hqthe word ‘vfsmount’ and the noun ‘mount’ have been used to mean the same thing, throughout this document.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj<)}(hhh](jA)}(hXMount states A **propagation event** is defined as event generated on a vfsmount that leads to mount or unmount actions in other vfsmounts. A **peer group** is defined as a group of vfsmounts that propagate events to each other. A given mount can be in one of the following states: (1) Shared mounts A **shared mount** is defined as a vfsmount that belongs to a peer group. For example:: mount --make-shared /mnt mount --bind /mnt /tmp The mount at /mnt and that at /tmp are both shared and belong to the same peer group. Anything mounted or unmounted under /mnt or /tmp reflect in all the other mounts of its peer group. (2) Slave mounts A **slave mount** is defined as a vfsmount that receives propagation events and does not forward propagation events. A slave mount as the name implies has a master mount from which mount/unmount events are received. Events do not propagate from the slave mount to the master. Only a shared mount can be made a slave by executing the following command:: mount --make-slave mount A shared mount that is made as a slave is no more shared unless modified to become shared. (3) Shared and Slave A vfsmount can be both **shared** as well as **slave**. This state indicates that the mount is a slave of some vfsmount, and has its own peer group too. This vfsmount receives propagation events from its master vfsmount, and also forwards propagation events to its 'peer group' and to its slave vfsmounts. Strictly speaking, the vfsmount is shared having its own peer group, and this peer-group is a slave of some other peer group. Only a slave vfsmount can be made as 'shared and slave' by either executing the following command:: mount --make-shared mount or by moving the slave vfsmount under a shared vfsmount. (4) Private mount A **private mount** is defined as vfsmount that does not receive or forward any propagation events. (5) Unbindable mount A **unbindable mount** is defined as vfsmount that does not receive or forward any propagation events and cannot be bind mounted. State diagram: The state diagram below explains the state transition of a mount, in response to various commands:: ----------------------------------------------------------------------- | |make-shared | make-slave | make-private |make-unbindab| --------------|------------|--------------|--------------|-------------| |shared |shared |*slave/private| private | unbindable | | | | | | | |-------------|------------|--------------|--------------|-------------| |slave |shared | **slave | private | unbindable | | |and slave | | | | |-------------|------------|--------------|--------------|-------------| |shared |shared | slave | private | unbindable | |and slave |and slave | | | | |-------------|------------|--------------|--------------|-------------| |private |shared | **private | private | unbindable | |-------------|------------|--------------|--------------|-------------| |unbindable |shared |**unbindable | private | unbindable | ------------------------------------------------------------------------ * if the shared mount is the only mount in its peer group, making it slave, makes it private automatically. Note that there is no master to which it can be slaved to. ** slaving a non-shared mount has no effect on the mount. Apart from the commands listed below, the 'move' operation also changes the state of a mount depending on type of the destination mount. Its explained in section 5d. h](h)}(h Mount statesh]h Mount states}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h~A **propagation event** is defined as event generated on a vfsmount that leads to mount or unmount actions in other vfsmounts.h](hA }(hjhhhNhNubjO)}(h**propagation event**h]hpropagation event}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubhg is defined as event generated on a vfsmount that leads to mount or unmount actions in other vfsmounts.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXA **peer group** is defined as a group of vfsmounts that propagate events to each other.h](hA }(hjhhhNhNubjO)}(h**peer group**h]h peer group}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubhH is defined as a group of vfsmounts that propagate events to each other.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h4A given mount can be in one of the following states:h]h4A given mount can be in one of the following states:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj<)}(hhh](jA)}(hXYShared mounts A **shared mount** is defined as a vfsmount that belongs to a peer group. For example:: mount --make-shared /mnt mount --bind /mnt /tmp The mount at /mnt and that at /tmp are both shared and belong to the same peer group. Anything mounted or unmounted under /mnt or /tmp reflect in all the other mounts of its peer group. h](h)}(h Shared mountsh]h Shared mounts}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubh)}(hIA **shared mount** is defined as a vfsmount that belongs to a peer group.h](hA }(hj:hhhNhNubjO)}(h**shared mount**h]h shared mount}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhj:ubh7 is defined as a vfsmount that belongs to a peer group.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj(ubh)}(h For example::h]h For example:}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj(ubj)}(h/mount --make-shared /mnt mount --bind /mnt /tmph]h/mount --make-shared /mnt mount --bind /mnt /tmp}hjhsbah}(h]h ]h"]h$]h&]hhuh1jhhhM hj(ubh)}(hThe mount at /mnt and that at /tmp are both shared and belong to the same peer group. Anything mounted or unmounted under /mnt or /tmp reflect in all the other mounts of its peer group.h]hThe mount at /mnt and that at /tmp are both shared and belong to the same peer group. Anything mounted or unmounted under /mnt or /tmp reflect in all the other mounts of its peer group.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubeh}(h]h ]h"]h$]h&]uh1j@hj%ubjA)}(hXSlave mounts A **slave mount** is defined as a vfsmount that receives propagation events and does not forward propagation events. A slave mount as the name implies has a master mount from which mount/unmount events are received. Events do not propagate from the slave mount to the master. Only a shared mount can be made a slave by executing the following command:: mount --make-slave mount A shared mount that is made as a slave is no more shared unless modified to become shared. h](h)}(h Slave mountsh]h Slave mounts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(htA **slave mount** is defined as a vfsmount that receives propagation events and does not forward propagation events.h](hA }(hjhhhNhNubjO)}(h**slave mount**h]h slave mount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubhc is defined as a vfsmount that receives propagation events and does not forward propagation events.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hA slave mount as the name implies has a master mount from which mount/unmount events are received. Events do not propagate from the slave mount to the master. Only a shared mount can be made a slave by executing the following command::h]hA slave mount as the name implies has a master mount from which mount/unmount events are received. Events do not propagate from the slave mount to the master. Only a shared mount can be made a slave by executing the following command:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hmount --make-slave mounth]hmount --make-slave mount}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjubh)}(hZA shared mount that is made as a slave is no more shared unless modified to become shared.h]hZA shared mount that is made as a slave is no more shared unless modified to become shared.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubeh}(h]h ]h"]h$]h&]uh1j@hj%ubjA)}(hXShared and Slave A vfsmount can be both **shared** as well as **slave**. This state indicates that the mount is a slave of some vfsmount, and has its own peer group too. This vfsmount receives propagation events from its master vfsmount, and also forwards propagation events to its 'peer group' and to its slave vfsmounts. Strictly speaking, the vfsmount is shared having its own peer group, and this peer-group is a slave of some other peer group. Only a slave vfsmount can be made as 'shared and slave' by either executing the following command:: mount --make-shared mount or by moving the slave vfsmount under a shared vfsmount. h](h)}(hShared and Slaveh]hShared and Slave}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubh)}(hX3A vfsmount can be both **shared** as well as **slave**. This state indicates that the mount is a slave of some vfsmount, and has its own peer group too. This vfsmount receives propagation events from its master vfsmount, and also forwards propagation events to its 'peer group' and to its slave vfsmounts.h](hA vfsmount can be both }(hjhhhNhNubjO)}(h **shared**h]hshared}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubh as well as }(hjhhhNhNubjO)}(h **slave**h]hslave}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubhX. This state indicates that the mount is a slave of some vfsmount, and has its own peer group too. This vfsmount receives propagation events from its master vfsmount, and also forwards propagation events to its ‘peer group’ and to its slave vfsmounts.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM%hjubh)}(h}Strictly speaking, the vfsmount is shared having its own peer group, and this peer-group is a slave of some other peer group.h]h}Strictly speaking, the vfsmount is shared having its own peer group, and this peer-group is a slave of some other peer group.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjubh)}(hcOnly a slave vfsmount can be made as 'shared and slave' by either executing the following command::h]hfOnly a slave vfsmount can be made as ‘shared and slave’ by either executing the following command:}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hjubj)}(hmount --make-shared mounth]hmount --make-shared mount}hjLsbah}(h]h ]h"]h$]h&]hhuh1jhhhM2hjubh)}(h8or by moving the slave vfsmount under a shared vfsmount.h]h8or by moving the slave vfsmount under a shared vfsmount.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hjubeh}(h]h ]h"]h$]h&]uh1j@hj%ubjA)}(hsPrivate mount A **private mount** is defined as vfsmount that does not receive or forward any propagation events. h](h)}(h Private mounth]h Private mount}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjnubh)}(hcA **private mount** is defined as vfsmount that does not receive or forward any propagation events.h](hA }(hjhhhNhNubjO)}(h**private mount**h]h private mount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubhP is defined as vfsmount that does not receive or forward any propagation events.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM8hjnubeh}(h]h ]h"]h$]h&]uh1j@hj%ubjA)}(hXUnbindable mount A **unbindable mount** is defined as vfsmount that does not receive or forward any propagation events and cannot be bind mounted. State diagram: The state diagram below explains the state transition of a mount, in response to various commands:: ----------------------------------------------------------------------- | |make-shared | make-slave | make-private |make-unbindab| --------------|------------|--------------|--------------|-------------| |shared |shared |*slave/private| private | unbindable | | | | | | | |-------------|------------|--------------|--------------|-------------| |slave |shared | **slave | private | unbindable | | |and slave | | | | |-------------|------------|--------------|--------------|-------------| |shared |shared | slave | private | unbindable | |and slave |and slave | | | | |-------------|------------|--------------|--------------|-------------| |private |shared | **private | private | unbindable | |-------------|------------|--------------|--------------|-------------| |unbindable |shared |**unbindable | private | unbindable | ------------------------------------------------------------------------ * if the shared mount is the only mount in its peer group, making it slave, makes it private automatically. Note that there is no master to which it can be slaved to. ** slaving a non-shared mount has no effect on the mount. Apart from the commands listed below, the 'move' operation also changes the state of a mount depending on type of the destination mount. Its explained in section 5d. h](h)}(hUnbindable mounth]hUnbindable mount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubh)}(hA **unbindable mount** is defined as vfsmount that does not receive or forward any propagation events and cannot be bind mounted.h](hA }(hjhhhNhNubjO)}(h**unbindable mount**h]hunbindable mount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubhk is defined as vfsmount that does not receive or forward any propagation events and cannot be bind mounted.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM=hjubh)}(hState diagram:h]hState diagram:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjubh)}(hcThe state diagram below explains the state transition of a mount, in response to various commands::h]hbThe state diagram below explains the state transition of a mount, in response to various commands:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjubj)}(hXq----------------------------------------------------------------------- | |make-shared | make-slave | make-private |make-unbindab| --------------|------------|--------------|--------------|-------------| |shared |shared |*slave/private| private | unbindable | | | | | | | |-------------|------------|--------------|--------------|-------------| |slave |shared | **slave | private | unbindable | | |and slave | | | | |-------------|------------|--------------|--------------|-------------| |shared |shared | slave | private | unbindable | |and slave |and slave | | | | |-------------|------------|--------------|--------------|-------------| |private |shared | **private | private | unbindable | |-------------|------------|--------------|--------------|-------------| |unbindable |shared |**unbindable | private | unbindable | ------------------------------------------------------------------------ * if the shared mount is the only mount in its peer group, making it slave, makes it private automatically. Note that there is no master to which it can be slaved to. ** slaving a non-shared mount has no effect on the mount.h]hXq----------------------------------------------------------------------- | |make-shared | make-slave | make-private |make-unbindab| --------------|------------|--------------|--------------|-------------| |shared |shared |*slave/private| private | unbindable | | | | | | | |-------------|------------|--------------|--------------|-------------| |slave |shared | **slave | private | unbindable | | |and slave | | | | |-------------|------------|--------------|--------------|-------------| |shared |shared | slave | private | unbindable | |and slave |and slave | | | | |-------------|------------|--------------|--------------|-------------| |private |shared | **private | private | unbindable | |-------------|------------|--------------|--------------|-------------| |unbindable |shared |**unbindable | private | unbindable | ------------------------------------------------------------------------ * if the shared mount is the only mount in its peer group, making it slave, makes it private automatically. Note that there is no master to which it can be slaved to. ** slaving a non-shared mount has no effect on the mount.}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMGhjubh)}(hApart from the commands listed below, the 'move' operation also changes the state of a mount depending on type of the destination mount. Its explained in section 5d.h]hApart from the commands listed below, the ‘move’ operation also changes the state of a mount depending on type of the destination mount. Its explained in section 5d.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjubeh}(h]h ]h"]h$]h&]uh1j@hj%ubeh}(h]h ]h"]h$]h&]jarabicj(jjuh1j;hjubeh}(h]h ]h"]h$]h&]uh1j@hjhhhNhNubjA)}(hXBind semantics Consider the following command:: mount --bind A/a B/b where 'A' is the source mount, 'a' is the dentry in the mount 'A', 'B' is the destination mount and 'b' is the dentry in the destination mount. The outcome depends on the type of mount of 'A' and 'B'. The table below contains quick reference:: -------------------------------------------------------------------------- | BIND MOUNT OPERATION | |************************************************************************| |source(A)->| shared | private | slave | unbindable | | dest(B) | | | | | | | | | | | | | v | | | | | |************************************************************************| | shared | shared | shared | shared & slave | invalid | | | | | | | |non-shared| shared | private | slave | invalid | ************************************************************************** Details: 1. 'A' is a shared mount and 'B' is a shared mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a' . 'C' is mounted on mount 'B' at dentry 'b'. Also new mount 'C1', 'C2', 'C3' ... are created and mounted at the dentry 'b' on all mounts where 'B' propagates to. A new propagation tree containing 'C1',..,'Cn' is created. This propagation tree is identical to the propagation tree of 'B'. And finally the peer-group of 'C' is merged with the peer group of 'A'. 2. 'A' is a private mount and 'B' is a shared mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. Also new mount 'C1', 'C2', 'C3' ... are created and mounted at the dentry 'b' on all mounts where 'B' propagates to. A new propagation tree is set containing all new mounts 'C', 'C1', .., 'Cn' with exactly the same configuration as the propagation tree for 'B'. 3. 'A' is a slave mount of mount 'Z' and 'B' is a shared mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a' . 'C' is mounted on mount 'B' at dentry 'b'. Also new mounts 'C1', 'C2', 'C3' ... are created and mounted at the dentry 'b' on all mounts where 'B' propagates to. A new propagation tree containing the new mounts 'C','C1',.. 'Cn' is created. This propagation tree is identical to the propagation tree for 'B'. And finally the mount 'C' and its peer group is made the slave of mount 'Z'. In other words, mount 'C' is in the state 'slave and shared'. 4. 'A' is a unbindable mount and 'B' is a shared mount. This is a invalid operation. 5. 'A' is a private mount and 'B' is a non-shared(private or slave or unbindable) mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. 6. 'A' is a shared mount and 'B' is a non-shared mount. A new mount 'C' which is a clone of 'A' is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. 'C' is made a member of the peer-group of 'A'. 7. 'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount. A new mount 'C' which is a clone of 'A' is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. Also 'C' is set as a slave mount of 'Z'. In other words 'A' and 'C' are both slave mounts of 'Z'. All mount/unmount events on 'Z' propagates to 'A' and 'C'. But mount/unmount on 'A' do not propagate anywhere else. Similarly mount/unmount on 'C' do not propagate anywhere else. 8. 'A' is a unbindable mount and 'B' is a non-shared mount. This is a invalid operation. A unbindable mount cannot be bind mounted. h](h)}(hBind semanticsh]hBind semantics}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhj$ubh)}(h Consider the following command::h]hConsider the following command:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj$ubj)}(hmount --bind A/a B/bh]hmount --bind A/a B/b}hjDsbah}(h]h ]h"]h$]h&]hhuh1jhhhMfhj$ubh)}(hwhere 'A' is the source mount, 'a' is the dentry in the mount 'A', 'B' is the destination mount and 'b' is the dentry in the destination mount.h]hwhere ‘A’ is the source mount, ‘a’ is the dentry in the mount ‘A’, ‘B’ is the destination mount and ‘b’ is the dentry in the destination mount.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhj$ubh)}(hcThe outcome depends on the type of mount of 'A' and 'B'. The table below contains quick reference::h]hjThe outcome depends on the type of mount of ‘A’ and ‘B’. The table below contains quick reference:}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj$ubj)}(hX-------------------------------------------------------------------------- | BIND MOUNT OPERATION | |************************************************************************| |source(A)->| shared | private | slave | unbindable | | dest(B) | | | | | | | | | | | | | v | | | | | |************************************************************************| | shared | shared | shared | shared & slave | invalid | | | | | | | |non-shared| shared | private | slave | invalid | **************************************************************************h]hX-------------------------------------------------------------------------- | BIND MOUNT OPERATION | |************************************************************************| |source(A)->| shared | private | slave | unbindable | | dest(B) | | | | | | | | | | | | | v | | | | | |************************************************************************| | shared | shared | shared | shared & slave | invalid | | | | | | | |non-shared| shared | private | slave | invalid | **************************************************************************}hjnsbah}(h]h ]h"]h$]h&]hhuh1jhhhMnhj$ubh)}(hDetails:h]hDetails:}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hj$ubj<)}(hhh](jA)}(hX'A' is a shared mount and 'B' is a shared mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a' . 'C' is mounted on mount 'B' at dentry 'b'. Also new mount 'C1', 'C2', 'C3' ... are created and mounted at the dentry 'b' on all mounts where 'B' propagates to. A new propagation tree containing 'C1',..,'Cn' is created. This propagation tree is identical to the propagation tree of 'B'. And finally the peer-group of 'C' is merged with the peer group of 'A'. h]h)}(hX'A' is a shared mount and 'B' is a shared mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a' . 'C' is mounted on mount 'B' at dentry 'b'. Also new mount 'C1', 'C2', 'C3' ... are created and mounted at the dentry 'b' on all mounts where 'B' propagates to. A new propagation tree containing 'C1',..,'Cn' is created. This propagation tree is identical to the propagation tree of 'B'. And finally the peer-group of 'C' is merged with the peer group of 'A'.h]hX+‘A’ is a shared mount and ‘B’ is a shared mount. A new mount ‘C’ which is clone of ‘A’, is created. Its root dentry is ‘a’ . ‘C’ is mounted on mount ‘B’ at dentry ‘b’. Also new mount ‘C1’, ‘C2’, ‘C3’ ... are created and mounted at the dentry ‘b’ on all mounts where ‘B’ propagates to. A new propagation tree containing ‘C1’,..,’Cn’ is created. This propagation tree is identical to the propagation tree of ‘B’. And finally the peer-group of ‘C’ is merged with the peer group of ‘A’.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(hX'A' is a private mount and 'B' is a shared mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. Also new mount 'C1', 'C2', 'C3' ... are created and mounted at the dentry 'b' on all mounts where 'B' propagates to. A new propagation tree is set containing all new mounts 'C', 'C1', .., 'Cn' with exactly the same configuration as the propagation tree for 'B'. h]h)}(hX'A' is a private mount and 'B' is a shared mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. Also new mount 'C1', 'C2', 'C3' ... are created and mounted at the dentry 'b' on all mounts where 'B' propagates to. A new propagation tree is set containing all new mounts 'C', 'C1', .., 'Cn' with exactly the same configuration as the propagation tree for 'B'.h]hX‘A’ is a private mount and ‘B’ is a shared mount. A new mount ‘C’ which is clone of ‘A’, is created. Its root dentry is ‘a’. ‘C’ is mounted on mount ‘B’ at dentry ‘b’. Also new mount ‘C1’, ‘C2’, ‘C3’ ... are created and mounted at the dentry ‘b’ on all mounts where ‘B’ propagates to. A new propagation tree is set containing all new mounts ‘C’, ‘C1’, .., ‘Cn’ with exactly the same configuration as the propagation tree for ‘B’.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(hXI'A' is a slave mount of mount 'Z' and 'B' is a shared mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a' . 'C' is mounted on mount 'B' at dentry 'b'. Also new mounts 'C1', 'C2', 'C3' ... are created and mounted at the dentry 'b' on all mounts where 'B' propagates to. A new propagation tree containing the new mounts 'C','C1',.. 'Cn' is created. This propagation tree is identical to the propagation tree for 'B'. And finally the mount 'C' and its peer group is made the slave of mount 'Z'. In other words, mount 'C' is in the state 'slave and shared'. h]h)}(hXH'A' is a slave mount of mount 'Z' and 'B' is a shared mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a' . 'C' is mounted on mount 'B' at dentry 'b'. Also new mounts 'C1', 'C2', 'C3' ... are created and mounted at the dentry 'b' on all mounts where 'B' propagates to. A new propagation tree containing the new mounts 'C','C1',.. 'Cn' is created. This propagation tree is identical to the propagation tree for 'B'. And finally the mount 'C' and its peer group is made the slave of mount 'Z'. In other words, mount 'C' is in the state 'slave and shared'.h]hX‘A’ is a slave mount of mount ‘Z’ and ‘B’ is a shared mount. A new mount ‘C’ which is clone of ‘A’, is created. Its root dentry is ‘a’ . ‘C’ is mounted on mount ‘B’ at dentry ‘b’. Also new mounts ‘C1’, ‘C2’, ‘C3’ ... are created and mounted at the dentry ‘b’ on all mounts where ‘B’ propagates to. A new propagation tree containing the new mounts ‘C’,’C1’,.. ‘Cn’ is created. This propagation tree is identical to the propagation tree for ‘B’. And finally the mount ‘C’ and its peer group is made the slave of mount ‘Z’. In other words, mount ‘C’ is in the state ‘slave and shared’.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(hR'A' is a unbindable mount and 'B' is a shared mount. This is a invalid operation. h]h)}(hQ'A' is a unbindable mount and 'B' is a shared mount. This is a invalid operation.h]hY‘A’ is a unbindable mount and ‘B’ is a shared mount. This is a invalid operation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(h'A' is a private mount and 'B' is a non-shared(private or slave or unbindable) mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. h]h)}(h'A' is a private mount and 'B' is a non-shared(private or slave or unbindable) mount. A new mount 'C' which is clone of 'A', is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'.h]h‘A’ is a private mount and ‘B’ is a non-shared(private or slave or unbindable) mount. A new mount ‘C’ which is clone of ‘A’, is created. Its root dentry is ‘a’. ‘C’ is mounted on mount ‘B’ at dentry ‘b’.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(h'A' is a shared mount and 'B' is a non-shared mount. A new mount 'C' which is a clone of 'A' is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. 'C' is made a member of the peer-group of 'A'. h]h)}(h'A' is a shared mount and 'B' is a non-shared mount. A new mount 'C' which is a clone of 'A' is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. 'C' is made a member of the peer-group of 'A'.h]hX‘A’ is a shared mount and ‘B’ is a non-shared mount. A new mount ‘C’ which is a clone of ‘A’ is created. Its root dentry is ‘a’. ‘C’ is mounted on mount ‘B’ at dentry ‘b’. ‘C’ is made a member of the peer-group of ‘A’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(hX'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount. A new mount 'C' which is a clone of 'A' is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. Also 'C' is set as a slave mount of 'Z'. In other words 'A' and 'C' are both slave mounts of 'Z'. All mount/unmount events on 'Z' propagates to 'A' and 'C'. But mount/unmount on 'A' do not propagate anywhere else. Similarly mount/unmount on 'C' do not propagate anywhere else. h]h)}(hX'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount. A new mount 'C' which is a clone of 'A' is created. Its root dentry is 'a'. 'C' is mounted on mount 'B' at dentry 'b'. Also 'C' is set as a slave mount of 'Z'. In other words 'A' and 'C' are both slave mounts of 'Z'. All mount/unmount events on 'Z' propagates to 'A' and 'C'. But mount/unmount on 'A' do not propagate anywhere else. Similarly mount/unmount on 'C' do not propagate anywhere else.h]hX‘A’ is a slave mount of mount ‘Z’ and ‘B’ is a non-shared mount. A new mount ‘C’ which is a clone of ‘A’ is created. Its root dentry is ‘a’. ‘C’ is mounted on mount ‘B’ at dentry ‘b’. Also ‘C’ is set as a slave mount of ‘Z’. In other words ‘A’ and ‘C’ are both slave mounts of ‘Z’. All mount/unmount events on ‘Z’ propagates to ‘A’ and ‘C’. But mount/unmount on ‘A’ do not propagate anywhere else. Similarly mount/unmount on ‘C’ do not propagate anywhere else.}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(h'A' is a unbindable mount and 'B' is a non-shared mount. This is a invalid operation. A unbindable mount cannot be bind mounted. h]h)}(h'A' is a unbindable mount and 'B' is a non-shared mount. This is a invalid operation. A unbindable mount cannot be bind mounted.h]h‘A’ is a unbindable mount and ‘B’ is a non-shared mount. This is a invalid operation. A unbindable mount cannot be bind mounted.}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5 ubah}(h]h ]h"]h$]h&]uh1j@hjubeh}(h]h ]h"]h$]h&]jjjhj.uh1j;hj$ubeh}(h]h ]h"]h$]h&]uh1j@hjhhhNhNubjA)}(hXeRbind semantics rbind is same as bind. Bind replicates the specified mount. Rbind replicates all the mounts in the tree belonging to the specified mount. Rbind mount is bind mount applied to all the mounts in the tree. If the source tree that is rbind has some unbindable mounts, then the subtree under the unbindable mount is pruned in the new location. eg: let's say we have the following mount tree:: A / \ B C / \ / \ D E F G Let's say all the mount except the mount C in the tree are of a type other than unbindable. If this tree is rbound to say Z We will have the following tree at the new location:: Z | A' / B' Note how the tree under C is pruned / \ in the new location. D' E' h](h)}(hRbind semanticsh]hRbind semantics}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ ubh)}(hrbind is same as bind. Bind replicates the specified mount. Rbind replicates all the mounts in the tree belonging to the specified mount. Rbind mount is bind mount applied to all the mounts in the tree.h]hrbind is same as bind. Bind replicates the specified mount. Rbind replicates all the mounts in the tree belonging to the specified mount. Rbind mount is bind mount applied to all the mounts in the tree.}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ ubh)}(hIf the source tree that is rbind has some unbindable mounts, then the subtree under the unbindable mount is pruned in the new location.h]hIf the source tree that is rbind has some unbindable mounts, then the subtree under the unbindable mount is pruned in the new location.}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ ubh)}(heg:h]heg:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ ubh)}(h,let's say we have the following mount tree::h]h-let’s say we have the following mount tree:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ ubj)}(h" A / \ B C / \ / \ D E F Gh]h" A / \ B C / \ / \ D E F G}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjZ ubh)}(h[Let's say all the mount except the mount C in the tree are of a type other than unbindable.h]h]Let’s say all the mount except the mount C in the tree are of a type other than unbindable.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ ubh)}(hIf this tree is rbound to say Zh]hIf this tree is rbound to say Z}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ ubh)}(h5We will have the following tree at the new location::h]h4We will have the following tree at the new location:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ ubj)}(h~ Z | A' / B' Note how the tree under C is pruned / \ in the new location. D' E'h]h~ Z | A' / B' Note how the tree under C is pruned / \ in the new location. D' E'}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjZ ubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubjA)}(hXHMove semantics Consider the following command:: mount --move A B/b where 'A' is the source mount, 'B' is the destination mount and 'b' is the dentry in the destination mount. The outcome depends on the type of the mount of 'A' and 'B'. The table below is a quick reference:: --------------------------------------------------------------------------- | MOVE MOUNT OPERATION | |************************************************************************** | source(A)->| shared | private | slave | unbindable | | dest(B) | | | | | | | | | | | | | v | | | | | |************************************************************************** | shared | shared | shared |shared and slave| invalid | | | | | | | |non-shared| shared | private | slave | unbindable | *************************************************************************** .. Note:: moving a mount residing under a shared mount is invalid. Details follow: 1. 'A' is a shared mount and 'B' is a shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Also new mounts 'A1', 'A2'...'An' are created and mounted at dentry 'b' on all mounts that receive propagation from mount 'B'. A new propagation tree is created in the exact same configuration as that of 'B'. This new propagation tree contains all the new mounts 'A1', 'A2'... 'An'. And this new propagation tree is appended to the already existing propagation tree of 'A'. 2. 'A' is a private mount and 'B' is a shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Also new mount 'A1', 'A2'... 'An' are created and mounted at dentry 'b' on all mounts that receive propagation from mount 'B'. The mount 'A' becomes a shared mount and a propagation tree is created which is identical to that of 'B'. This new propagation tree contains all the new mounts 'A1', 'A2'... 'An'. 3. 'A' is a slave mount of mount 'Z' and 'B' is a shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Also new mounts 'A1', 'A2'... 'An' are created and mounted at dentry 'b' on all mounts that receive propagation from mount 'B'. A new propagation tree is created in the exact same configuration as that of 'B'. This new propagation tree contains all the new mounts 'A1', 'A2'... 'An'. And this new propagation tree is appended to the already existing propagation tree of 'A'. Mount 'A' continues to be the slave mount of 'Z' but it also becomes 'shared'. 4. 'A' is a unbindable mount and 'B' is a shared mount. The operation is invalid. Because mounting anything on the shared mount 'B' can create new mounts that get mounted on the mounts that receive propagation from 'B'. And since the mount 'A' is unbindable, cloning it to mount at other mountpoints is not possible. 5. 'A' is a private mount and 'B' is a non-shared(private or slave or unbindable) mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. 6. 'A' is a shared mount and 'B' is a non-shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a shared mount. 7. 'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a slave mount of mount 'Z'. 8. 'A' is a unbindable mount and 'B' is a non-shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a unbindable mount. h](h)}(hMove semanticsh]hMove semantics}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(h Consider the following command::h]hConsider the following command:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hmount --move A B/bh]hmount --move A B/b}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhj ubh)}(hkwhere 'A' is the source mount, 'B' is the destination mount and 'b' is the dentry in the destination mount.h]hwwhere ‘A’ is the source mount, ‘B’ is the destination mount and ‘b’ is the dentry in the destination mount.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hcThe outcome depends on the type of the mount of 'A' and 'B'. The table below is a quick reference::h]hjThe outcome depends on the type of the mount of ‘A’ and ‘B’. The table below is a quick reference:}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hX--------------------------------------------------------------------------- | MOVE MOUNT OPERATION | |************************************************************************** | source(A)->| shared | private | slave | unbindable | | dest(B) | | | | | | | | | | | | | v | | | | | |************************************************************************** | shared | shared | shared |shared and slave| invalid | | | | | | | |non-shared| shared | private | slave | unbindable | ***************************************************************************h]hX--------------------------------------------------------------------------- | MOVE MOUNT OPERATION | |************************************************************************** | source(A)->| shared | private | slave | unbindable | | dest(B) | | | | | | | | | | | | | v | | | | | |************************************************************************** | shared | shared | shared |shared and slave| invalid | | | | | | | |non-shared| shared | private | slave | unbindable | ***************************************************************************}hj: sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhj ubj)}(h8moving a mount residing under a shared mount is invalid.h]h)}(hjJ h]h8moving a mount residing under a shared mount is invalid.}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjH ubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(hDetails follow:h]hDetails follow:}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj<)}(hhh](jA)}(hX'A' is a shared mount and 'B' is a shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Also new mounts 'A1', 'A2'...'An' are created and mounted at dentry 'b' on all mounts that receive propagation from mount 'B'. A new propagation tree is created in the exact same configuration as that of 'B'. This new propagation tree contains all the new mounts 'A1', 'A2'... 'An'. And this new propagation tree is appended to the already existing propagation tree of 'A'. h]h)}(hX'A' is a shared mount and 'B' is a shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Also new mounts 'A1', 'A2'...'An' are created and mounted at dentry 'b' on all mounts that receive propagation from mount 'B'. A new propagation tree is created in the exact same configuration as that of 'B'. This new propagation tree contains all the new mounts 'A1', 'A2'... 'An'. And this new propagation tree is appended to the already existing propagation tree of 'A'.h]hX‘A’ is a shared mount and ‘B’ is a shared mount. The mount ‘A’ is mounted on mount ‘B’ at dentry ‘b’. Also new mounts ‘A1’, ‘A2’...’An’ are created and mounted at dentry ‘b’ on all mounts that receive propagation from mount ‘B’. A new propagation tree is created in the exact same configuration as that of ‘B’. This new propagation tree contains all the new mounts ‘A1’, ‘A2’... ‘An’. And this new propagation tree is appended to the already existing propagation tree of ‘A’.}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjp ubah}(h]h ]h"]h$]h&]uh1j@hjm ubjA)}(hX'A' is a private mount and 'B' is a shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Also new mount 'A1', 'A2'... 'An' are created and mounted at dentry 'b' on all mounts that receive propagation from mount 'B'. The mount 'A' becomes a shared mount and a propagation tree is created which is identical to that of 'B'. This new propagation tree contains all the new mounts 'A1', 'A2'... 'An'. h]h)}(hX'A' is a private mount and 'B' is a shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Also new mount 'A1', 'A2'... 'An' are created and mounted at dentry 'b' on all mounts that receive propagation from mount 'B'. The mount 'A' becomes a shared mount and a propagation tree is created which is identical to that of 'B'. This new propagation tree contains all the new mounts 'A1', 'A2'... 'An'.h]hX‘A’ is a private mount and ‘B’ is a shared mount. The mount ‘A’ is mounted on mount ‘B’ at dentry ‘b’. Also new mount ‘A1’, ‘A2’... ‘An’ are created and mounted at dentry ‘b’ on all mounts that receive propagation from mount ‘B’. The mount ‘A’ becomes a shared mount and a propagation tree is created which is identical to that of ‘B’. This new propagation tree contains all the new mounts ‘A1’, ‘A2’... ‘An’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j@hjm ubjA)}(hX='A' is a slave mount of mount 'Z' and 'B' is a shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Also new mounts 'A1', 'A2'... 'An' are created and mounted at dentry 'b' on all mounts that receive propagation from mount 'B'. A new propagation tree is created in the exact same configuration as that of 'B'. This new propagation tree contains all the new mounts 'A1', 'A2'... 'An'. And this new propagation tree is appended to the already existing propagation tree of 'A'. Mount 'A' continues to be the slave mount of 'Z' but it also becomes 'shared'. h]h)}(hX<'A' is a slave mount of mount 'Z' and 'B' is a shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Also new mounts 'A1', 'A2'... 'An' are created and mounted at dentry 'b' on all mounts that receive propagation from mount 'B'. A new propagation tree is created in the exact same configuration as that of 'B'. This new propagation tree contains all the new mounts 'A1', 'A2'... 'An'. And this new propagation tree is appended to the already existing propagation tree of 'A'. Mount 'A' continues to be the slave mount of 'Z' but it also becomes 'shared'.h]hX‘A’ is a slave mount of mount ‘Z’ and ‘B’ is a shared mount. The mount ‘A’ is mounted on mount ‘B’ at dentry ‘b’. Also new mounts ‘A1’, ‘A2’... ‘An’ are created and mounted at dentry ‘b’ on all mounts that receive propagation from mount ‘B’. A new propagation tree is created in the exact same configuration as that of ‘B’. This new propagation tree contains all the new mounts ‘A1’, ‘A2’... ‘An’. And this new propagation tree is appended to the already existing propagation tree of ‘A’. Mount ‘A’ continues to be the slave mount of ‘Z’ but it also becomes ‘shared’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j@hjm ubjA)}(hX;'A' is a unbindable mount and 'B' is a shared mount. The operation is invalid. Because mounting anything on the shared mount 'B' can create new mounts that get mounted on the mounts that receive propagation from 'B'. And since the mount 'A' is unbindable, cloning it to mount at other mountpoints is not possible. h]h)}(hX:'A' is a unbindable mount and 'B' is a shared mount. The operation is invalid. Because mounting anything on the shared mount 'B' can create new mounts that get mounted on the mounts that receive propagation from 'B'. And since the mount 'A' is unbindable, cloning it to mount at other mountpoints is not possible.h]hXN‘A’ is a unbindable mount and ‘B’ is a shared mount. The operation is invalid. Because mounting anything on the shared mount ‘B’ can create new mounts that get mounted on the mounts that receive propagation from ‘B’. And since the mount ‘A’ is unbindable, cloning it to mount at other mountpoints is not possible.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1j@hjm ubjA)}(h'A' is a private mount and 'B' is a non-shared(private or slave or unbindable) mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. h]h)}(h'A' is a private mount and 'B' is a non-shared(private or slave or unbindable) mount. The mount 'A' is mounted on mount 'B' at dentry 'b'.h]h‘A’ is a private mount and ‘B’ is a non-shared(private or slave or unbindable) mount. The mount ‘A’ is mounted on mount ‘B’ at dentry ‘b’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j@hjm ubjA)}(h'A' is a shared mount and 'B' is a non-shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a shared mount. h]h)}(h'A' is a shared mount and 'B' is a non-shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a shared mount.h]h‘A’ is a shared mount and ‘B’ is a non-shared mount. The mount ‘A’ is mounted on mount ‘B’ at dentry ‘b’. Mount ‘A’ continues to be a shared mount.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j@hjm ubjA)}(h'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a slave mount of mount 'Z'. h]h)}(h'A' is a slave mount of mount 'Z' and 'B' is a non-shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a slave mount of mount 'Z'.h]h‘A’ is a slave mount of mount ‘Z’ and ‘B’ is a non-shared mount. The mount ‘A’ is mounted on mount ‘B’ at dentry ‘b’. Mount ‘A’ continues to be a slave mount of mount ‘Z’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j@hjm ubjA)}(h'A' is a unbindable mount and 'B' is a non-shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a unbindable mount. h]h)}(h'A' is a unbindable mount and 'B' is a non-shared mount. The mount 'A' is mounted on mount 'B' at dentry 'b'. Mount 'A' continues to be a unbindable mount.h]h‘A’ is a unbindable mount and ‘B’ is a non-shared mount. The mount ‘A’ is mounted on mount ‘B’ at dentry ‘b’. Mount ‘A’ continues to be a unbindable mount.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j@hjm ubeh}(h]h ]h"]h$]h&]jjjhjjS uh1j;hj ubeh}(h]h ]h"]h$]h&]uh1j@hjhhhNhNubjA)}(hX Mount semantics Consider the following command:: mount device B/b 'B' is the destination mount and 'b' is the dentry in the destination mount. The above operation is the same as bind operation with the exception that the source mount is always a private mount. h](h)}(hMount semanticsh]hMount semantics}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj< ubh)}(h Consider the following command::h]hConsider the following command:}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj< ubj)}(hmount device B/bh]hmount device B/b}hj\ sbah}(h]h ]h"]h$]h&]hhuh1jhhhM%hj< ubh)}(hL'B' is the destination mount and 'b' is the dentry in the destination mount.h]hT‘B’ is the destination mount and ‘b’ is the dentry in the destination mount.}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj< ubh)}(huThe above operation is the same as bind operation with the exception that the source mount is always a private mount.h]huThe above operation is the same as bind operation with the exception that the source mount is always a private mount.}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj< ubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubjA)}(hX}Unmount semantics Consider the following command:: umount A where 'A' is a mount mounted on mount 'B' at dentry 'b'. If mount 'B' is shared, then all most-recently-mounted mounts at dentry 'b' on mounts that receive propagation from mount 'B' and does not have sub-mounts within them are unmounted. Example: Let's say 'B1', 'B2', 'B3' are shared mounts that propagate to each other. let's say 'A1', 'A2', 'A3' are first mounted at dentry 'b' on mount 'B1', 'B2' and 'B3' respectively. let's say 'C1', 'C2', 'C3' are next mounted at the same dentry 'b' on mount 'B1', 'B2' and 'B3' respectively. if 'C1' is unmounted, all the mounts that are most-recently-mounted on 'B1' and on the mounts that 'B1' propagates-to are unmounted. 'B1' propagates to 'B2' and 'B3'. And the most recently mounted mount on 'B2' at dentry 'b' is 'C2', and that of mount 'B3' is 'C3'. So all 'C1', 'C2' and 'C3' should be unmounted. If any of 'C2' or 'C3' has some child mounts, then that mount is not unmounted, but all other mounts are unmounted. However if 'C1' is told to be unmounted and 'C1' has some sub-mounts, the umount operation is failed entirely. h](h)}(hUnmount semanticsh]hUnmount semantics}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hj ubh)}(h Consider the following command::h]hConsider the following command:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj ubj)}(humount Ah]humount A}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhM2hj ubh)}(h8where 'A' is a mount mounted on mount 'B' at dentry 'b'.h]hDwhere ‘A’ is a mount mounted on mount ‘B’ at dentry ‘b’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj ubh)}(hIf mount 'B' is shared, then all most-recently-mounted mounts at dentry 'b' on mounts that receive propagation from mount 'B' and does not have sub-mounts within them are unmounted.h]hIf mount ‘B’ is shared, then all most-recently-mounted mounts at dentry ‘b’ on mounts that receive propagation from mount ‘B’ and does not have sub-mounts within them are unmounted.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj ubh)}(hSExample: Let's say 'B1', 'B2', 'B3' are shared mounts that propagate to each other.h]haExample: Let’s say ‘B1’, ‘B2’, ‘B3’ are shared mounts that propagate to each other.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hj ubh)}(helet's say 'A1', 'A2', 'A3' are first mounted at dentry 'b' on mount 'B1', 'B2' and 'B3' respectively.h]hlet’s say ‘A1’, ‘A2’, ‘A3’ are first mounted at dentry ‘b’ on mount ‘B1’, ‘B2’ and ‘B3’ respectively.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj ubh)}(hmlet's say 'C1', 'C2', 'C3' are next mounted at the same dentry 'b' on mount 'B1', 'B2' and 'B3' respectively.h]hlet’s say ‘C1’, ‘C2’, ‘C3’ are next mounted at the same dentry ‘b’ on mount ‘B1’, ‘B2’ and ‘B3’ respectively.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hj ubh)}(hif 'C1' is unmounted, all the mounts that are most-recently-mounted on 'B1' and on the mounts that 'B1' propagates-to are unmounted.h]hif ‘C1’ is unmounted, all the mounts that are most-recently-mounted on ‘B1’ and on the mounts that ‘B1’ propagates-to are unmounted.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj ubh)}(h'B1' propagates to 'B2' and 'B3'. And the most recently mounted mount on 'B2' at dentry 'b' is 'C2', and that of mount 'B3' is 'C3'.h]h‘B1’ propagates to ‘B2’ and ‘B3’. And the most recently mounted mount on ‘B2’ at dentry ‘b’ is ‘C2’, and that of mount ‘B3’ is ‘C3’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj ubh)}(h/So all 'C1', 'C2' and 'C3' should be unmounted.h]h;So all ‘C1’, ‘C2’ and ‘C3’ should be unmounted.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj ubh)}(hIf any of 'C2' or 'C3' has some child mounts, then that mount is not unmounted, but all other mounts are unmounted. However if 'C1' is told to be unmounted and 'C1' has some sub-mounts, the umount operation is failed entirely.h]hIf any of ‘C2’ or ‘C3’ has some child mounts, then that mount is not unmounted, but all other mounts are unmounted. However if ‘C1’ is told to be unmounted and ‘C1’ has some sub-mounts, the umount operation is failed entirely.}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhj ubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubjA)}(hXClone Namespace A cloned namespace contains all the mounts as that of the parent namespace. Let's say 'A' and 'B' are the corresponding mounts in the parent and the child namespace. If 'A' is shared, then 'B' is also shared and 'A' and 'B' propagate to each other. If 'A' is a slave mount of 'Z', then 'B' is also the slave mount of 'Z'. If 'A' is a private mount, then 'B' is a private mount too. If 'A' is unbindable mount, then 'B' is a unbindable mount too. h](h)}(hClone Namespaceh]hClone Namespace}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj> ubh)}(hKA cloned namespace contains all the mounts as that of the parent namespace.h]hKA cloned namespace contains all the mounts as that of the parent namespace.}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj> ubh)}(hYLet's say 'A' and 'B' are the corresponding mounts in the parent and the child namespace.h]hcLet’s say ‘A’ and ‘B’ are the corresponding mounts in the parent and the child namespace.}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj> ubh)}(hRIf 'A' is shared, then 'B' is also shared and 'A' and 'B' propagate to each other.h]hbIf ‘A’ is shared, then ‘B’ is also shared and ‘A’ and ‘B’ propagate to each other.}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj> ubh)}(hHIf 'A' is a slave mount of 'Z', then 'B' is also the slave mount of 'Z'.h]hXIf ‘A’ is a slave mount of ‘Z’, then ‘B’ is also the slave mount of ‘Z’.}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hj> ubh)}(h;If 'A' is a private mount, then 'B' is a private mount too.h]hCIf ‘A’ is a private mount, then ‘B’ is a private mount too.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hj> ubh)}(h?If 'A' is unbindable mount, then 'B' is a unbindable mount too.h]hGIf ‘A’ is unbindable mount, then ‘B’ is a unbindable mount too.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM`hj> ubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1j;hjhhhhhKubeh}(h]detailed-semanticsah ]h"]5) detailed semanticsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h6) Quizh]h6) Quiz}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMdubj<)}(hhh](jA)}(hX7What is the result of the following command sequence? :: mount --bind /mnt /mnt mount --make-shared /mnt mount --bind /mnt /tmp mount --move /tmp /mnt/1 what should be the contents of /mnt /mnt/1 /mnt/1/1 should be? Should they all be identical? or should /mnt and /mnt/1 be identical only? h](h)}(h5What is the result of the following command sequence?h]h5What is the result of the following command sequence?}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhj ubj)}(h_mount --bind /mnt /mnt mount --make-shared /mnt mount --bind /mnt /tmp mount --move /tmp /mnt/1h]h_mount --bind /mnt /mnt mount --make-shared /mnt mount --bind /mnt /tmp mount --move /tmp /mnt/1}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhMjhj ubh)}(hwhat should be the contents of /mnt /mnt/1 /mnt/1/1 should be? Should they all be identical? or should /mnt and /mnt/1 be identical only?h]hwhat should be the contents of /mnt /mnt/1 /mnt/1/1 should be? Should they all be identical? or should /mnt and /mnt/1 be identical only?}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohj ubeh}(h]h ]h"]h$]h&]uh1j@hj hhhhhNubjA)}(hWhat is the result of the following command sequence? :: mount --make-rshared / mkdir -p /v/1 mount --rbind / /v/1 what should be the content of /v/1/v/1 be? h](h)}(h5What is the result of the following command sequence?h]h5What is the result of the following command sequence?}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthj ubj)}(h9mount --make-rshared / mkdir -p /v/1 mount --rbind / /v/1h]h9mount --make-rshared / mkdir -p /v/1 mount --rbind / /v/1}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhMxhj ubh)}(h*what should be the content of /v/1/v/1 be?h]h*what should be the content of /v/1/v/1 be?}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hj ubeh}(h]h ]h"]h$]h&]uh1j@hj hhhhhNubjA)}(hXBWhat is the result of the following command sequence? :: mount --bind /mnt /mnt mount --make-shared /mnt mkdir -p /mnt/1/2/3 /mnt/1/test mount --bind /mnt/1 /tmp mount --make-slave /mnt mount --make-shared /mnt mount --bind /mnt/1/2 /tmp1 mount --make-slave /mnt At this point we have the first mount at /tmp and its root dentry is 1. Let's call this mount 'A' And then we have a second mount at /tmp1 with root dentry 2. Let's call this mount 'B' Next we have a third mount at /mnt with root dentry mnt. Let's call this mount 'C' 'B' is the slave of 'A' and 'C' is a slave of 'B' A -> B -> C at this point if we execute the following command:: mount --bind /bin /tmp/test The mount is attempted on 'A' will the mount propagate to 'B' and 'C' ? what would be the contents of /mnt/1/test be? h](h)}(h5What is the result of the following command sequence?h]h5What is the result of the following command sequence?}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4 ubj)}(hmount --bind /mnt /mnt mount --make-shared /mnt mkdir -p /mnt/1/2/3 /mnt/1/test mount --bind /mnt/1 /tmp mount --make-slave /mnt mount --make-shared /mnt mount --bind /mnt/1/2 /tmp1 mount --make-slave /mnth]hmount --bind /mnt /mnt mount --make-shared /mnt mkdir -p /mnt/1/2/3 /mnt/1/test mount --bind /mnt/1 /tmp mount --make-slave /mnt mount --make-shared /mnt mount --bind /mnt/1/2 /tmp1 mount --make-slave /mnt}hjF sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhj4 ubh)}(hX At this point we have the first mount at /tmp and its root dentry is 1. Let's call this mount 'A' And then we have a second mount at /tmp1 with root dentry 2. Let's call this mount 'B' Next we have a third mount at /mnt with root dentry mnt. Let's call this mount 'C'h]hXAt this point we have the first mount at /tmp and its root dentry is 1. Let’s call this mount ‘A’ And then we have a second mount at /tmp1 with root dentry 2. Let’s call this mount ‘B’ Next we have a third mount at /mnt with root dentry mnt. Let’s call this mount ‘C’}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4 ubh)}(h='B' is the slave of 'A' and 'C' is a slave of 'B' A -> B -> Ch]hM‘B’ is the slave of ‘A’ and ‘C’ is a slave of ‘B’ A -> B -> C}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4 ubh)}(h3at this point if we execute the following command::h]h2at this point if we execute the following command:}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4 ubj)}(hmount --bind /bin /tmp/testh]hmount --bind /bin /tmp/test}hj~ sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhj4 ubh)}(hThe mount is attempted on 'A'h]h!The mount is attempted on ‘A’}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4 ubh)}(h)will the mount propagate to 'B' and 'C' ?h]h1will the mount propagate to ‘B’ and ‘C’ ?}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4 ubh)}(h-what would be the contents of /mnt/1/test be?h]h-what would be the contents of /mnt/1/test be?}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4 ubeh}(h]h ]h"]h$]h&]uh1j@hj hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjS uh1j;hj hhhhhMfubeh}(h]quizah ]h"]6) quizah$]h&]uh1hhhhhhhhMdubh)}(hhh](h)}(h7) FAQh]h7) FAQ}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubj<)}(hhh](jA)}(hWhy is bind mount needed? How is it different from symbolic links? symbolic links can get stale if the destination mount gets unmounted or moved. Bind mounts continue to exist even if the other mount is unmounted or moved. h](h)}(hBWhy is bind mount needed? How is it different from symbolic links?h]hBWhy is bind mount needed? How is it different from symbolic links?}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hsymbolic links can get stale if the destination mount gets unmounted or moved. Bind mounts continue to exist even if the other mount is unmounted or moved.h]hsymbolic links can get stale if the destination mount gets unmounted or moved. Bind mounts continue to exist even if the other mount is unmounted or moved.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1j@hj hhhhhNubjA)}(hWhy can't the shared subtree be implemented using exportfs? exportfs is a heavyweight way of accomplishing part of what shared subtree can do. I cannot imagine a way to implement the semantics of slave mount using exportfs? h](h)}(h;Why can't the shared subtree be implemented using exportfs?h]h=Why can’t the shared subtree be implemented using exportfs?}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hexportfs is a heavyweight way of accomplishing part of what shared subtree can do. I cannot imagine a way to implement the semantics of slave mount using exportfs?h]hexportfs is a heavyweight way of accomplishing part of what shared subtree can do. I cannot imagine a way to implement the semantics of slave mount using exportfs?}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1j@hj hhhhhNubjA)}(hX{Why is unbindable mount needed? Let's say we want to replicate the mount tree at multiple locations within the same subtree. if one rbind mounts a tree within the same subtree 'n' times the number of mounts created is an exponential function of 'n'. Having unbindable mount can help prune the unneeded bind mounts. Here is an example. step 1: let's say the root tree has just two directories with one vfsmount:: root / \ tmp usr And we want to replicate the tree at multiple mountpoints under /root/tmp step 2: :: mount --make-shared /root mkdir -p /tmp/m1 mount --rbind /root /tmp/m1 the new tree now looks like this:: root / \ tmp usr / m1 / \ tmp usr / m1 it has two vfsmounts step 3: :: mkdir -p /tmp/m2 mount --rbind /root /tmp/m2 the new tree now looks like this:: root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usr / \ / m1 m2 m1 / \ / \ tmp usr tmp usr / / \ m1 m1 m2 / \ tmp usr / \ m1 m2 it has 6 vfsmounts step 4: :: mkdir -p /tmp/m3 mount --rbind /root /tmp/m3 I won't draw the tree..but it has 24 vfsmounts at step i the number of vfsmounts is V[i] = i*V[i-1]. This is an exponential function. And this tree has way more mounts than what we really needed in the first place. One could use a series of umount at each step to prune out the unneeded mounts. But there is a better solution. Unclonable mounts come in handy here. step 1: let's say the root tree has just two directories with one vfsmount:: root / \ tmp usr How do we set up the same tree at multiple locations under /root/tmp step 2: :: mount --bind /root/tmp /root/tmp mount --make-rshared /root mount --make-unbindable /root/tmp mkdir -p /tmp/m1 mount --rbind /root /tmp/m1 the new tree now looks like this:: root / \ tmp usr / m1 / \ tmp usr step 3: :: mkdir -p /tmp/m2 mount --rbind /root /tmp/m2 the new tree now looks like this:: root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usr step 4: :: mkdir -p /tmp/m3 mount --rbind /root /tmp/m3 the new tree now looks like this:: root / \ tmp usr / \ \ m1 m2 m3 / \ / \ / \ tmp usr tmp usr tmp usr h](h)}(hWhy is unbindable mount needed?h]hWhy is unbindable mount needed?}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubh)}(h\Let's say we want to replicate the mount tree at multiple locations within the same subtree.h]h^Let’s say we want to replicate the mount tree at multiple locations within the same subtree.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubh)}(hif one rbind mounts a tree within the same subtree 'n' times the number of mounts created is an exponential function of 'n'. Having unbindable mount can help prune the unneeded bind mounts. Here is an example.h]hif one rbind mounts a tree within the same subtree ‘n’ times the number of mounts created is an exponential function of ‘n’. Having unbindable mount can help prune the unneeded bind mounts. Here is an example.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubhdefinition_list)}(hhh](hdefinition_list_item)}(hXstep 1: let's say the root tree has just two directories with one vfsmount:: root / \ tmp usr And we want to replicate the tree at multiple mountpoints under /root/tmp h](hterm)}(hstep 1:h]hstep 1:}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMhj_ubh definition)}(hhh](h)}(hDlet's say the root tree has just two directories with one vfsmount::h]hElet’s say the root tree has just two directories with one vfsmount:}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjuubj)}(h root / \ tmp usrh]h root / \ tmp usr}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjuubh)}(hIAnd we want to replicate the tree at multiple mountpoints under /root/tmph]hIAnd we want to replicate the tree at multiple mountpoints under /root/tmp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjuubeh}(h]h ]h"]h$]h&]uh1jshj_ubeh}(h]h ]h"]h$]h&]uh1j]hhhMhjZubj^)}(hXstep 2: :: mount --make-shared /root mkdir -p /tmp/m1 mount --rbind /root /tmp/m1 the new tree now looks like this:: root / \ tmp usr / m1 / \ tmp usr / m1 it has two vfsmounts h](jd)}(hstep 2:h]hstep 2:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMhjubjt)}(hhh](j)}(hHmount --make-shared /root mkdir -p /tmp/m1 mount --rbind /root /tmp/m1h]hHmount --make-shared /root mkdir -p /tmp/m1 mount --rbind /root /tmp/m1}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjubh)}(h"the new tree now looks like this::h]h!the new tree now looks like this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hM root / \ tmp usr / m1 / \ tmp usr / m1h]hM root / \ tmp usr / m1 / \ tmp usr / m1}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjubh)}(hit has two vfsmountsh]hit has two vfsmounts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1j]hhhMhjZubj^)}(hXstep 3: :: mkdir -p /tmp/m2 mount --rbind /root /tmp/m2 the new tree now looks like this:: root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usr / \ / m1 m2 m1 / \ / \ tmp usr tmp usr / / \ m1 m1 m2 / \ tmp usr / \ m1 m2 it has 6 vfsmounts h](jd)}(hstep 3:h]hstep 3:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMhjubjt)}(hhh](j)}(h,mkdir -p /tmp/m2 mount --rbind /root /tmp/m2h]h,mkdir -p /tmp/m2 mount --rbind /root /tmp/m2}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjubh)}(h"the new tree now looks like this::h]h!the new tree now looks like this:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hX root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usr / \ / m1 m2 m1 / \ / \ tmp usr tmp usr / / \ m1 m1 m2 / \ tmp usr / \ m1 m2 it has 6 vfsmountsh]hX root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usr / \ / m1 m2 m1 / \ / \ tmp usr tmp usr / / \ m1 m1 m2 / \ tmp usr / \ m1 m2 it has 6 vfsmounts}hj8sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1j]hhhMhjZubj^)}(hstep 4: :: mkdir -p /tmp/m3 mount --rbind /root /tmp/m3 I won't draw the tree..but it has 24 vfsmounts h](jd)}(hstep 4:h]hstep 4:}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMhjRubjt)}(hhh](j)}(h,mkdir -p /tmp/m3 mount --rbind /root /tmp/m3h]h,mkdir -p /tmp/m3 mount --rbind /root /tmp/m3}hjgsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjdubh)}(h.I won't draw the tree..but it has 24 vfsmountsh]h0I won’t draw the tree..but it has 24 vfsmounts}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjdubeh}(h]h ]h"]h$]h&]uh1jshjRubeh}(h]h ]h"]h$]h&]uh1j]hhhMhjZubeh}(h]h ]h"]h$]h&]uh1jXhj*ubh)}(hat step i the number of vfsmounts is V[i] = i*V[i-1]. This is an exponential function. And this tree has way more mounts than what we really needed in the first place.h]hat step i the number of vfsmounts is V[i] = i*V[i-1]. This is an exponential function. And this tree has way more mounts than what we really needed in the first place.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubh)}(hOne could use a series of umount at each step to prune out the unneeded mounts. But there is a better solution. Unclonable mounts come in handy here.h]hOne could use a series of umount at each step to prune out the unneeded mounts. But there is a better solution. Unclonable mounts come in handy here.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubjY)}(hhh](j^)}(hXstep 1: let's say the root tree has just two directories with one vfsmount:: root / \ tmp usr How do we set up the same tree at multiple locations under /root/tmp h](jd)}(hstep 1:h]hstep 1:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMhjubjt)}(hhh](h)}(hDlet's say the root tree has just two directories with one vfsmount::h]hElet’s say the root tree has just two directories with one vfsmount:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubj)}(h root / \ tmp usr How do we set up the same tree at multiple locations under /root/tmph]h root / \ tmp usr How do we set up the same tree at multiple locations under /root/tmp}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1j]hhhMhjubj^)}(hXstep 2: :: mount --bind /root/tmp /root/tmp mount --make-rshared /root mount --make-unbindable /root/tmp mkdir -p /tmp/m1 mount --rbind /root /tmp/m1 the new tree now looks like this:: root / \ tmp usr / m1 / \ tmp usr h](jd)}(hstep 2:h]hstep 2:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhM*hjubjt)}(hhh](j)}(hmount --bind /root/tmp /root/tmp mount --make-rshared /root mount --make-unbindable /root/tmp mkdir -p /tmp/m1 mount --rbind /root /tmp/m1h]hmount --bind /root/tmp /root/tmp mount --make-rshared /root mount --make-unbindable /root/tmp mkdir -p /tmp/m1 mount --rbind /root /tmp/m1}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjubh)}(h"the new tree now looks like this::h]h!the new tree now looks like this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubj)}(h@ root / \ tmp usr / m1 / \ tmp usrh]h@ root / \ tmp usr / m1 / \ tmp usr}hj"sbah}(h]h ]h"]h$]h&]hhuh1jhhhM$hjubeh}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1j]hhhM*hjubj^)}(hXstep 3: :: mkdir -p /tmp/m2 mount --rbind /root /tmp/m2 the new tree now looks like this:: root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usr h](jd)}(hstep 3:h]hstep 3:}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhM:hj<ubjt)}(hhh](j)}(h,mkdir -p /tmp/m2 mount --rbind /root /tmp/m2h]h,mkdir -p /tmp/m2 mount --rbind /root /tmp/m2}hjQsbah}(h]h ]h"]h$]h&]hhuh1jhhhM/hjNubh)}(h"the new tree now looks like this::h]h!the new tree now looks like this:}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjNubj)}(h[ root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usrh]h[ root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usr}hjmsbah}(h]h ]h"]h$]h&]hhuh1jhhhM4hjNubeh}(h]h ]h"]h$]h&]uh1jshj<ubeh}(h]h ]h"]h$]h&]uh1j]hhhM:hjubj^)}(hXstep 4: :: mkdir -p /tmp/m3 mount --rbind /root /tmp/m3 the new tree now looks like this:: root / \ tmp usr / \ \ m1 m2 m3 / \ / \ / \ tmp usr tmp usr tmp usr h](jd)}(hstep 4:h]hstep 4:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMJhjubjt)}(hhh](j)}(h,mkdir -p /tmp/m3 mount --rbind /root /tmp/m3h]h,mkdir -p /tmp/m3 mount --rbind /root /tmp/m3}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhM?hjubh)}(h"the new tree now looks like this::h]h!the new tree now looks like this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjubj)}(h root / \ tmp usr / \ \ m1 m2 m3 / \ / \ / \ tmp usr tmp usr tmp usrh]h root / \ tmp usr / \ \ m1 m2 m3 / \ / \ / \ tmp usr tmp usr tmp usr}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMDhjubeh}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1j]hhhMJhjubeh}(h]h ]h"]h$]h&]uh1jXhj*ubeh}(h]h ]h"]h$]h&]uh1j@hj hhhNhNubeh}(h]h ]h"]h$]h&]jjjhjjS uh1j;hj hhhhhMubeh}(h]faqah ]h"]7) faqah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h8) Implementationh]h8) Implementation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMMubj<)}(hhh](jA)}(hXd Datastructure Several new fields are introduced to struct vfsmount: ->mnt_share Links together all the mount to/from which this vfsmount send/receives propagation events. ->mnt_slave_list Links all the mounts to which this vfsmount propagates to. ->mnt_slave Links together all the slaves that its master vfsmount propagates to. ->mnt_master Points to the master vfsmount from which this vfsmount receives propagation. ->mnt_flags Takes two more flags to indicate the propagation status of the vfsmount. MNT_SHARE indicates that the vfsmount is a shared vfsmount. MNT_UNCLONABLE indicates that the vfsmount cannot be replicated. All the shared vfsmounts in a peer group form a cyclic list through ->mnt_share. All vfsmounts with the same ->mnt_master form on a cyclic list anchored in ->mnt_master->mnt_slave_list and going through ->mnt_slave. ->mnt_master can point to arbitrary (and possibly different) members of master peer group. To find all immediate slaves of a peer group you need to go through _all_ ->mnt_slave_list of its members. Conceptually it's just a single set - distribution among the individual lists does not affect propagation or the way propagation tree is modified by operations. All vfsmounts in a peer group have the same ->mnt_master. If it is non-NULL, they form a contiguous (ordered) segment of slave list. A example propagation tree looks as shown in the figure below. .. note:: Though it looks like a forest, if we consider all the shared mounts as a conceptual entity called 'pnode', it becomes a tree. :: A <--> B <--> C <---> D /|\ /| |\ / F G J K H I / E<-->K /|\ M L N In the above figure A,B,C and D all are shared and propagate to each other. 'A' has got 3 slave mounts 'E' 'F' and 'G' 'C' has got 2 slave mounts 'J' and 'K' and 'D' has got two slave mounts 'H' and 'I'. 'E' is also shared with 'K' and they propagate to each other. And 'K' has 3 slaves 'M', 'L' and 'N' A's ->mnt_share links with the ->mnt_share of 'B' 'C' and 'D' A's ->mnt_slave_list links with ->mnt_slave of 'E', 'K', 'F' and 'G' E's ->mnt_share links with ->mnt_share of K 'E', 'K', 'F', 'G' have their ->mnt_master point to struct vfsmount of 'A' 'M', 'L', 'N' have their ->mnt_master point to struct vfsmount of 'K' K's ->mnt_slave_list links with ->mnt_slave of 'M', 'L' and 'N' C's ->mnt_slave_list links with ->mnt_slave of 'J' and 'K' J and K's ->mnt_master points to struct vfsmount of C and finally D's ->mnt_slave_list links with ->mnt_slave of 'H' and 'I' 'H' and 'I' have their ->mnt_master pointing to struct vfsmount of 'D'. NOTE: The propagation tree is orthogonal to the mount tree. h](h)}(h Datastructureh]h Datastructure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjubh)}(h5Several new fields are introduced to struct vfsmount:h]h5Several new fields are introduced to struct vfsmount:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjubjY)}(hhh](j^)}(hg->mnt_share Links together all the mount to/from which this vfsmount send/receives propagation events. h](jd)}(h ->mnt_shareh]h ->mnt_share}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMUhj#ubjt)}(hhh]h)}(hZLinks together all the mount to/from which this vfsmount send/receives propagation events.h]hZLinks together all the mount to/from which this vfsmount send/receives propagation events.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj5ubah}(h]h ]h"]h$]h&]uh1jshj#ubeh}(h]h ]h"]h$]h&]uh1j]hhhMUhj ubj^)}(hL->mnt_slave_list Links all the mounts to which this vfsmount propagates to. h](jd)}(h->mnt_slave_listh]h->mnt_slave_list}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMYhjRubjt)}(hhh]h)}(h:Links all the mounts to which this vfsmount propagates to.h]h:Links all the mounts to which this vfsmount propagates to.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjdubah}(h]h ]h"]h$]h&]uh1jshjRubeh}(h]h ]h"]h$]h&]uh1j]hhhMYhj ubj^)}(hR->mnt_slave Links together all the slaves that its master vfsmount propagates to. h](jd)}(h ->mnt_slaveh]h ->mnt_slave}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhM]hjubjt)}(hhh]h)}(hELinks together all the slaves that its master vfsmount propagates to.h]hELinks together all the slaves that its master vfsmount propagates to.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjubah}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1j]hhhM]hj ubj^)}(hZ->mnt_master Points to the master vfsmount from which this vfsmount receives propagation. h](jd)}(h ->mnt_masterh]h ->mnt_master}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMahjubjt)}(hhh]h)}(hLPoints to the master vfsmount from which this vfsmount receives propagation.h]hLPoints to the master vfsmount from which this vfsmount receives propagation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM`hjubah}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1j]hhhMahj ubj^)}(h->mnt_flags Takes two more flags to indicate the propagation status of the vfsmount. MNT_SHARE indicates that the vfsmount is a shared vfsmount. MNT_UNCLONABLE indicates that the vfsmount cannot be replicated. h](jd)}(h ->mnt_flagsh]h ->mnt_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jchhhMghjubjt)}(hhh]h)}(hTakes two more flags to indicate the propagation status of the vfsmount. MNT_SHARE indicates that the vfsmount is a shared vfsmount. MNT_UNCLONABLE indicates that the vfsmount cannot be replicated.h]hTakes two more flags to indicate the propagation status of the vfsmount. MNT_SHARE indicates that the vfsmount is a shared vfsmount. MNT_UNCLONABLE indicates that the vfsmount cannot be replicated.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjubah}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1j]hhhMghj ubeh}(h]h ]h"]h$]h&]uh1jXhjubh)}(hPAll the shared vfsmounts in a peer group form a cyclic list through ->mnt_share.h]hPAll the shared vfsmounts in a peer group form a cyclic list through ->mnt_share.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihjubh)}(hAll vfsmounts with the same ->mnt_master form on a cyclic list anchored in ->mnt_master->mnt_slave_list and going through ->mnt_slave.h]hAll vfsmounts with the same ->mnt_master form on a cyclic list anchored in ->mnt_master->mnt_slave_list and going through ->mnt_slave.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjubh)}(hXg->mnt_master can point to arbitrary (and possibly different) members of master peer group. To find all immediate slaves of a peer group you need to go through _all_ ->mnt_slave_list of its members. Conceptually it's just a single set - distribution among the individual lists does not affect propagation or the way propagation tree is modified by operations.h]hXi->mnt_master can point to arbitrary (and possibly different) members of master peer group. To find all immediate slaves of a peer group you need to go through _all_ ->mnt_slave_list of its members. Conceptually it’s just a single set - distribution among the individual lists does not affect propagation or the way propagation tree is modified by operations.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjubh)}(hAll vfsmounts in a peer group have the same ->mnt_master. If it is non-NULL, they form a contiguous (ordered) segment of slave list.h]hAll vfsmounts in a peer group have the same ->mnt_master. If it is non-NULL, they form a contiguous (ordered) segment of slave list.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjubh)}(h>A example propagation tree looks as shown in the figure below.h]h>A example propagation tree looks as shown in the figure below.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhjubj)}(h}Though it looks like a forest, if we consider all the shared mounts as a conceptual entity called 'pnode', it becomes a tree.h]h)}(h}Though it looks like a forest, if we consider all the shared mounts as a conceptual entity called 'pnode', it becomes a tree.h]hThough it looks like a forest, if we consider all the shared mounts as a conceptual entity called ‘pnode’, it becomes a tree.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjZubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hq A <--> B <--> C <---> D /|\ /| |\ / F G J K H I / E<-->K /|\ M L Nh]hq A <--> B <--> C <---> D /|\ /| |\ / F G J K H I / E<-->K /|\ M L N}hjrsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjubh)}(hX5In the above figure A,B,C and D all are shared and propagate to each other. 'A' has got 3 slave mounts 'E' 'F' and 'G' 'C' has got 2 slave mounts 'J' and 'K' and 'D' has got two slave mounts 'H' and 'I'. 'E' is also shared with 'K' and they propagate to each other. And 'K' has 3 slaves 'M', 'L' and 'N'h]hXuIn the above figure A,B,C and D all are shared and propagate to each other. ‘A’ has got 3 slave mounts ‘E’ ‘F’ and ‘G’ ‘C’ has got 2 slave mounts ‘J’ and ‘K’ and ‘D’ has got two slave mounts ‘H’ and ‘I’. ‘E’ is also shared with ‘K’ and they propagate to each other. And ‘K’ has 3 slaves ‘M’, ‘L’ and ‘N’}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h=A's ->mnt_share links with the ->mnt_share of 'B' 'C' and 'D'h]hKA’s ->mnt_share links with the ->mnt_share of ‘B’ ‘C’ and ‘D’}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hDA's ->mnt_slave_list links with ->mnt_slave of 'E', 'K', 'F' and 'G'h]hVA’s ->mnt_slave_list links with ->mnt_slave of ‘E’, ‘K’, ‘F’ and ‘G’}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h+E's ->mnt_share links with ->mnt_share of Kh]h-E’s ->mnt_share links with ->mnt_share of K}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hJ'E', 'K', 'F', 'G' have their ->mnt_master point to struct vfsmount of 'A'h]h^‘E’, ‘K’, ‘F’, ‘G’ have their ->mnt_master point to struct vfsmount of ‘A’}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hE'M', 'L', 'N' have their ->mnt_master point to struct vfsmount of 'K'h]hU‘M’, ‘L’, ‘N’ have their ->mnt_master point to struct vfsmount of ‘K’}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h?K's ->mnt_slave_list links with ->mnt_slave of 'M', 'L' and 'N'h]hMK’s ->mnt_slave_list links with ->mnt_slave of ‘M’, ‘L’ and ‘N’}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h:C's ->mnt_slave_list links with ->mnt_slave of 'J' and 'K'h]hDC’s ->mnt_slave_list links with ->mnt_slave of ‘J’ and ‘K’}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h5J and K's ->mnt_master points to struct vfsmount of Ch]h7J and K’s ->mnt_master points to struct vfsmount of C}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hFand finally D's ->mnt_slave_list links with ->mnt_slave of 'H' and 'I'h]hPand finally D’s ->mnt_slave_list links with ->mnt_slave of ‘H’ and ‘I’}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hG'H' and 'I' have their ->mnt_master pointing to struct vfsmount of 'D'.h]hS‘H’ and ‘I’ have their ->mnt_master pointing to struct vfsmount of ‘D’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h;NOTE: The propagation tree is orthogonal to the mount tree.h]h;NOTE: The propagation tree is orthogonal to the mount tree.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubjA)}(hXLocking: ->mnt_share, ->mnt_slave, ->mnt_slave_list, ->mnt_master are protected by namespace_sem (exclusive for modifications, shared for reading). Normally we have ->mnt_flags modifications serialized by vfsmount_lock. There are two exceptions: do_add_mount() and clone_mnt(). The former modifies a vfsmount that has not been visible in any shared data structures yet. The latter holds namespace_sem and the only references to vfsmount are in lists that can't be traversed without namespace_sem. h](h)}(hLocking:h]hLocking:}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubh)}(h->mnt_share, ->mnt_slave, ->mnt_slave_list, ->mnt_master are protected by namespace_sem (exclusive for modifications, shared for reading).h]h->mnt_share, ->mnt_slave, ->mnt_slave_list, ->mnt_master are protected by namespace_sem (exclusive for modifications, shared for reading).}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubh)}(hX\Normally we have ->mnt_flags modifications serialized by vfsmount_lock. There are two exceptions: do_add_mount() and clone_mnt(). The former modifies a vfsmount that has not been visible in any shared data structures yet. The latter holds namespace_sem and the only references to vfsmount are in lists that can't be traversed without namespace_sem.h]hX^Normally we have ->mnt_flags modifications serialized by vfsmount_lock. There are two exceptions: do_add_mount() and clone_mnt(). The former modifies a vfsmount that has not been visible in any shared data structures yet. The latter holds namespace_sem and the only references to vfsmount are in lists that can’t be traversed without namespace_sem.}(hjNhh)hNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubeh}(h]h ]h"]h$]h&]uh1j@hjhhhhhNubjA)}(hXAlgorithm: The crux of the implementation resides in rbind/move operation. The overall algorithm breaks the operation into 3 phases: (look at attach_recursive_mnt() and propagate_mnt()) 1. Prepare phase. For each mount in the source tree: a) Create the necessary number of mount trees to be attached to each of the mounts that receive propagation from the destination mount. b) Do not attach any of the trees to its destination. However note down its ->mnt_parent and ->mnt_mountpoint c) Link all the new mounts to form a propagation tree that is identical to the propagation tree of the destination mount. If this phase is successful, there should be 'n' new propagation trees; where 'n' is the number of mounts in the source tree. Go to the commit phase Also there should be 'm' new mount trees, where 'm' is the number of mounts to which the destination mount propagates to. If any memory allocations fail, go to the abort phase. 2. Commit phase. Attach each of the mount trees to their corresponding destination mounts. 3. Abort phase. Delete all the newly created trees. .. Note:: all the propagation related functionality resides in the file pnode.c h](h)}(h Algorithm:h]h Algorithm:}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubh)}(h?The crux of the implementation resides in rbind/move operation.h]h?The crux of the implementation resides in rbind/move operation.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubh)}(hnThe overall algorithm breaks the operation into 3 phases: (look at attach_recursive_mnt() and propagate_mnt())h]hnThe overall algorithm breaks the operation into 3 phases: (look at attach_recursive_mnt() and propagate_mnt())}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubj<)}(hhh](jA)}(hXPrepare phase. For each mount in the source tree: a) Create the necessary number of mount trees to be attached to each of the mounts that receive propagation from the destination mount. b) Do not attach any of the trees to its destination. However note down its ->mnt_parent and ->mnt_mountpoint c) Link all the new mounts to form a propagation tree that is identical to the propagation tree of the destination mount. If this phase is successful, there should be 'n' new propagation trees; where 'n' is the number of mounts in the source tree. Go to the commit phase Also there should be 'm' new mount trees, where 'm' is the number of mounts to which the destination mount propagates to. If any memory allocations fail, go to the abort phase. h](h)}(hPrepare phase.h]hPrepare phase.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h"For each mount in the source tree:h]h"For each mount in the source tree:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj<)}(hhh](jA)}(hCreate the necessary number of mount trees to be attached to each of the mounts that receive propagation from the destination mount.h]h)}(hCreate the necessary number of mount trees to be attached to each of the mounts that receive propagation from the destination mount.h]hCreate the necessary number of mount trees to be attached to each of the mounts that receive propagation from the destination mount.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(hjDo not attach any of the trees to its destination. However note down its ->mnt_parent and ->mnt_mountpointh]h)}(hjDo not attach any of the trees to its destination. However note down its ->mnt_parent and ->mnt_mountpointh]hjDo not attach any of the trees to its destination. However note down its ->mnt_parent and ->mnt_mountpoint}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(hwLink all the new mounts to form a propagation tree that is identical to the propagation tree of the destination mount. h]h)}(hvLink all the new mounts to form a propagation tree that is identical to the propagation tree of the destination mount.h]hvLink all the new mounts to form a propagation tree that is identical to the propagation tree of the destination mount.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j@hjubeh}(h]h ]h"]h$]h&]jjjhjjuh1j;hjubh)}(hIf this phase is successful, there should be 'n' new propagation trees; where 'n' is the number of mounts in the source tree. Go to the commit phaseh]hIf this phase is successful, there should be ‘n’ new propagation trees; where ‘n’ is the number of mounts in the source tree. Go to the commit phase}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hyAlso there should be 'm' new mount trees, where 'm' is the number of mounts to which the destination mount propagates to.h]hAlso there should be ‘m’ new mount trees, where ‘m’ is the number of mounts to which the destination mount propagates to.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h6If any memory allocations fail, go to the abort phase.h]h6If any memory allocations fail, go to the abort phase.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1j@hjubjA)}(hYCommit phase. Attach each of the mount trees to their corresponding destination mounts. h](h)}(h Commit phase.h]h Commit phase.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubh)}(hIAttach each of the mount trees to their corresponding destination mounts.h]hIAttach each of the mount trees to their corresponding destination mounts.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubeh}(h]h ]h"]h$]h&]uh1j@hjubjA)}(h2Abort phase. Delete all the newly created trees. h](h)}(h Abort phase.h]h Abort phase.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubh)}(h#Delete all the newly created trees.h]h#Delete all the newly created trees.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubeh}(h]h ]h"]h$]h&]uh1j@hjubeh}(h]h ]h"]h$]h&]jjjhjjS uh1j;hjbubj)}(hEall the propagation related functionality resides in the file pnode.ch]h)}(hjh]hEall the propagation related functionality resides in the file pnode.c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]uh1j@hjhhhNhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1j;hjhhhhhMOubh transition)}(hH------------------------------------------------------------------------h]h}(h]h ]h"]h$]h&]uh1jhhhMhjhhubh)}(hHversion 0.1 (created the initial document, Ram Pai linuxram@us.ibm.com)h](h4version 0.1 (created the initial document, Ram Pai }(hjhhhNhNubh reference)}(hlinuxram@us.ibm.comh]hlinuxram@us.ibm.com}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:linuxram@us.ibm.comuh1jhjubh)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h1version 0.2 (Incorporated comments from Al Viro)h]h1version 0.2 (Incorporated comments from Al Viro)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]implementationah ]h"]8) implementationah$]h&]uh1hhhhhhhhMMubeh}(h]shared-subtreesah ]h"]shared subtreesah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjjjjjjjj j j j jjjju nametypes}(jjjjjj j jjuh}(jhjhjjjjjjj jj j jj jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(h:Enumerated list start value not ordinal-1: "C" (ordinal 3)h]h>Enumerated list start value not ordinal-1: “C” (ordinal 3)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j|hjhhhhhKubatransform_messages] transformerN include_log] decorationNhhub.