€•!Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ-/translations/zh_CN/filesystems/sharedsubtree”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ-/translations/zh_TW/filesystems/sharedsubtree”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ-/translations/it_IT/filesystems/sharedsubtree”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ-/translations/ja_JP/filesystems/sharedsubtree”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ-/translations/ko_KR/filesystems/sharedsubtree”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ-/translations/pt_BR/filesystems/sharedsubtree”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ-/translations/sp_SP/filesystems/sharedsubtree”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒG/var/lib/git/docbuild/linux/Documentation/filesystems/sharedsubtree.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒShared Subtrees”h]”hŒShared Subtrees”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´Kubh¶)�”}”(hŒ|Contents: 1) Overview 2) Features 3) Setting mount states 4) Use-case 5) Detailed semantics 6) Quiz 7) FAQ 8) Implementation”h]”hŒ|Contents: 1) Overview 2) Features 3) Setting mount states 4) Use-case 5) Detailed semantics 6) Quiz 7) FAQ 8) Implementation”…”�”}”hhÝsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ 1) Overview”h]”hŒ 1) Overview”…”�”}”(hhîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhëh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hŒ!Consider the following situation:”h]”hŒ!Consider the following situation:”…”�”}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khhëh²hubhý)�”}”(hŒºA 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]”hŒºA 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.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khhëh²hubhý)�”}”(hŒhIt provides the necessary building blocks for features like per-user-namespace and versioned filesystem.”h]”hŒhIt provides the necessary building blocks for features like per-user-namespace and versioned filesystem.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khhëh²hubeh}”(h]”Œoverview”ah ]”h"]”Œ 1) overview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ 2) Features”h]”hŒ 2) Features”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj0h²hh³hÇh´Kubhý)�”}”(hŒXShared subtree provides four different flavors of mounts; struct vfsmount to be precise:”h]”hŒXShared subtree provides four different flavors of mounts; struct vfsmount to be precise:”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K!hj0h²hubhŒenumerated_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ý)�”}”(hŒmA **shared mount** can be replicated to as many mountpoints and all the replicas continue to be exactly same.”h]”(hŒA ”…”�”}”(hjZh²hh³Nh´NubhŒstrong”“”)�”}”(hŒ**shared mount**”h]”hŒ shared mount”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjZubhŒ[ can be replicated to as many mountpoints and all the replicas continue to be exactly same.”…”�”}”(hjZh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K%hjVubhý)�”}”(hŒHere is an example:”h]”hŒHere is an example:”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K(hjVubhý)�”}”(hŒ+Let's say /mnt has a mount that is shared::”h]”hŒ,Let’s say /mnt has a mount that is shared:”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K*hjVubhŒ literal_block”“”)�”}”(hŒ# mount --make-shared /mnt”h]”hŒ# mount --make-shared /mnt”…”�”}”hjšsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´K,hjVubhŒnote”“”)�”}”(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]”hŒ‚mount(8) command now supports the --make-shared flag, so the sample ‘smount’ program is no longer needed and has been removed.”…”�”}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K/hjªubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjVubj™)�”}”(hŒ# mount --bind /mnt /tmp”h]”hŒ# mount --bind /mnt /tmp”…”�”}”hjÂsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´K5hjVubhý)�”}”(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.”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K7hjVubj™)�”}”(hŒ#ls /mnt a b c #ls /tmp a b c”h]”hŒ#ls /mnt a b c #ls /tmp a b c”…”�”}”hjÞsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Klet’s say we have a mount at /mnt and we make it unbindable:”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KŠhj^ubj™)�”}”(hŒ# mount --make-unbindable /mnt”h]”hŒ# mount --make-unbindable /mnt”…”�”}”hj�sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´KŒhj^ubhý)�”}”(hŒ3Let's try to bind mount this mount somewhere else::”h]”hŒ4Let’s try to bind mount this mount somewhere else:”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KŽhj^ubj™)�”}”(hŒs# mount --bind /mnt /tmp mount: wrong fs type, bad option, bad superblock on /mnt, or too many mounted file systems”h]”hŒs# mount --bind /mnt /tmp mount: wrong fs type, bad option, bad superblock on /mnt, or too many mounted file systems”…”�”}”hj¬sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´K�hj^ubhý)�”}”(hŒ2Binding a unbindable mount is a invalid operation.”h]”hŒ2Binding a unbindable mount is a invalid operation.”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K“hj^ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjQh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œ loweralpha”Œprefix”hŒsuffix”Œ)”uh1jOhj0h²hh³hÇh´K%ubeh}”(h]”Œfeatures”ah ]”h"]”Œ 2) features”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ3) Setting mount states”h]”hŒ3) Setting mount states”…”�”}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjáh²hh³hÇh´K—ubhý)�”}”(hŒHThe mount command (util-linux package) can be used to set mount states::”h]”hŒGThe mount command (util-linux package) can be used to set mount states:”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K™hjáh²hubj™)�”}”(hŒmount --make-shared mountpoint mount --make-slave mountpoint mount --make-private mountpoint mount --make-unbindable mountpoint”h]”hŒmount --make-shared mountpoint mount --make-slave mountpoint mount --make-private mountpoint mount --make-unbindable mountpoint”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Kœhjáh²hubeh}”(h]”Œsetting-mount-states”ah ]”h"]”Œ3) setting mount states”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K—ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ 4) Use cases”h]”hŒ 4) Use cases”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´K£ubjP)�”}”(hhh]”(jU)�”}”(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ý)�”}”(hŒgA process wants to clone its own namespace, but still wants to access the CD that got mounted recently.”h]”hŒgA process wants to clone its own namespace, but still wants to access the CD that got mounted recently.”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¥hj*ubhý)�”}”(hŒ Solution:”h]”hŒ Solution:”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¨hj*ubhý)�”}”(hŒ>The system administrator can make the mount at /cdrom shared::”h]”hŒ=The system administrator can make the mount at /cdrom shared:”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kªhj*ubj™)�”}”(hŒ5mount --bind /cdrom /cdrom mount --make-shared /cdrom”h]”hŒ5mount --bind /cdrom /cdrom mount --make-shared /cdrom”…”�”}”hjXsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´K¬hj*ubhý)�”}”(hŒ‰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.”h]”hŒ‰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.”…”�”}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¯hj*ubhý)�”}”(hŒ‰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Œ‰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.”…”�”}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K³hj*ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj'h²hh³hÇh´NubjU)�”}”(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ý)�”}”(hŒlA process wants its mounts invisible to any other process, but still be able to see the other system mounts.”h]”hŒlA process wants its mounts invisible to any other process, but still be able to see the other system mounts.”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K·hjˆubhý)�”}”(hŒ Solution:”h]”hŒ Solution:”…”�”}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kºhjˆubhý)�”}”(hŒNTo begin with, the administrator can mark the entire mount tree as shareable::”h]”hŒMTo begin with, the administrator can mark the entire mount tree as shareable:”…”�”}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¼hjˆubj™)�”}”(hŒmount --make-rshared /”h]”hŒmount --make-rshared /”…”�”}”hj¶sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´K¿hjˆubhý)�”}”(hŒ[A new process can clone off a new namespace. And mark some part of its namespace as slave::”h]”hŒZA new process can clone off a new namespace. And mark some part of its namespace as slave:”…”�”}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÁhjˆubj™)�”}”(hŒ"mount --make-rslave /myprivatetree”h]”hŒ"mount --make-rslave /myprivatetree”…”�”}”hjÒsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´KÄhjˆubhý)�”}”(hŒÙ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ŒÛ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.”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÆhjˆubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj'h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÔŒ upperalpha”jÖhj×jØuh1jOhjh²hh³hÇh´K¥ubhý)�”}”(hŒiApart from the above semantics this feature provides the building blocks to solve the following problems:”h]”hŒiApart from the above semantics this feature provides the building blocks to solve the following problems:”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÌhjh²hubjP)�”}”(hhh]”(jU)�”}”(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ý)�”}”(hŒPer-user namespace”h]”hŒPer-user namespace”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÏhj ubhý)�”}”(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.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÑhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj h²hh³hÇh´NubjU)�”}”(hXðVersioned 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ý)�”}”(hŒVersioned files”h]”hŒVersioned files”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KØhj2ubhý)�”}”(hŒ¾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.”h]”hŒ¾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.”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÚhj2ubhý)�”}”(hŒAn example is::”h]”hŒAn example is:”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kßhj2ubj™)�”}”(hŒymount --make-shared / mount --rbind / /view/v1 mount --rbind / /view/v2 mount --rbind / /view/v3 mount --rbind / /view/v4”h]”hŒymount --make-shared / mount --rbind / /view/v1 mount --rbind / /view/v2 mount --rbind / /view/v3 mount --rbind / /view/v4”…”�”}”hj`sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Káhj2ubhý)�”}”(hŒ‰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”h]”hŒ‰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”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kçhj2ubhý)�”}”(hŒø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Œø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.”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Këhj2ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÔjújÖhj×jØŒstart”Kuh1jOhjh²hh³hÇh´KÏubeh}”(h]”Œ use-cases”ah ]”h"]”Œ 4) use cases”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K£ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ5) Detailed semantics”h]”hŒ5) Detailed semantics”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjŸh²hh³hÇh´Kòubhý)�”}”(hŒuThe section below explains the detailed semantics of bind, rbind, move, mount, umount and clone-namespace operations.”h]”hŒuThe section below explains the detailed semantics of bind, rbind, move, mount, umount and clone-namespace operations.”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KóhjŸh²hubj©)�”}”(hŒithe word 'vfsmount' and the noun 'mount' have been used to mean the same thing, throughout this document.”h]”hý)�”}”(hŒithe word 'vfsmount' and the noun 'mount' have been used to mean the same thing, throughout this document.”h]”hŒqthe word ‘vfsmount’ and the noun ‘mount’ have been used to mean the same thing, throughout this document.”…”�”}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K÷hj¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hjŸh²hh³hÇh´NubjP)�”}”(hhh]”(jU)�”}”(hXèMount 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 states”h]”hŒ Mount states”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KúhjÙubhý)�”}”(hŒ~A **propagation event** is defined as event generated on a vfsmount that leads to mount or unmount actions in other vfsmounts.”h]”(hŒA ”…”�”}”(hjëh²hh³Nh´Nubjc)�”}”(hŒ**propagation event**”h]”hŒpropagation event”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjëubhŒg is defined as event generated on a vfsmount that leads to mount or unmount actions in other vfsmounts.”…”�”}”(hjëh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KühjÙubhý)�”}”(hŒXA **peer group** is defined as a group of vfsmounts that propagate events to each other.”h]”(hŒA ”…”�”}”(hj h²hh³Nh´Nubjc)�”}”(hŒ**peer group**”h]”hŒ peer group”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj ubhŒH is defined as a group of vfsmounts that propagate events to each other.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÿhjÙubhý)�”}”(hŒ4A given mount can be in one of the following states:”h]”hŒ4A given mount can be in one of the following states:”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÙubjP)�”}”(hhh]”(jU)�”}”(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 mounts”h]”hŒ Shared mounts”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj<ubhý)�”}”(hŒIA **shared mount** is defined as a vfsmount that belongs to a peer group.”h]”(hŒA ”…”�”}”(hjNh²hh³Nh´Nubjc)�”}”(hŒ**shared mount**”h]”hŒ shared mount”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjNubhŒ7 is defined as a vfsmount that belongs to a peer group.”…”�”}”(hjNh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj<ubhý)�”}”(hŒ For example::”h]”hŒ For example:”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hj<ubj™)�”}”(hŒ/mount --make-shared /mnt mount --bind /mnt /tmp”h]”hŒ/mount --make-shared /mnt mount --bind /mnt /tmp”…”�”}”hj|sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M hj<ubhý)�”}”(hŒ¹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Œ¹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.”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj<ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj9ubjU)�”}”(hXé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. ”h]”(hý)�”}”(hŒ Slave mounts”h]”hŒ Slave mounts”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjžubhý)�”}”(hŒtA **slave mount** is defined as a vfsmount that receives propagation events and does not forward propagation events.”h]”(hŒA ”…”�”}”(hj°h²hh³Nh´Nubjc)�”}”(hŒ**slave mount**”h]”hŒ slave mount”…”�”}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj°ubhŒc is defined as a vfsmount that receives propagation events and does not forward propagation events.”…”�”}”(hj°h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjžubhý)�”}”(hŒì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::”h]”hŒë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:”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjžubj™)�”}”(hŒmount --make-slave mount”h]”hŒmount --make-slave mount”…”�”}”hjÞsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Mhjžubhý)�”}”(hŒZA shared mount that is made as a slave is no more shared unless modified to become shared.”h]”hŒZA shared mount that is made as a slave is no more shared unless modified to become shared.”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hjžubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj9ubjU)�”}”(hX�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. ”h]”(hý)�”}”(hŒShared and Slave”h]”hŒShared and Slave”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M#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]”(hŒA vfsmount can be both ”…”�”}”(hjh²hh³Nh´Nubjc)�”}”(hŒ **shared**”h]”hŒshared”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjubhŒ as well as ”…”�”}”(hjh²hh³Nh´Nubjc)�”}”(hŒ **slave**”h]”hŒslave”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjubhX. 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.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M%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.”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M+hjubhý)�”}”(hŒcOnly a slave vfsmount can be made as 'shared and slave' by either executing the following command::”h]”hŒfOnly a slave vfsmount can be made as ‘shared and slave’ by either executing the following command:”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M/hjubj™)�”}”(hŒmount --make-shared mount”h]”hŒmount --make-shared mount”…”�”}”hj`sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M2hjubhý)�”}”(hŒ8or by moving the slave vfsmount under a shared vfsmount.”h]”hŒ8or by moving the slave vfsmount under a shared vfsmount.”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M4hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj9ubjU)�”}”(hŒsPrivate mount A **private mount** is defined as vfsmount that does not receive or forward any propagation events. ”h]”(hý)�”}”(hŒ Private mount”h]”hŒ Private mount”…”�”}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M6hj‚ubhý)�”}”(hŒcA **private mount** is defined as vfsmount that does not receive or forward any propagation events.”h]”(hŒA ”…”�”}”(hj”h²hh³Nh´Nubjc)�”}”(hŒ**private mount**”h]”hŒ private mount”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj”ubhŒP is defined as vfsmount that does not receive or forward any propagation events.”…”�”}”(hj”h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M8hj‚ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj9ubjU)�”}”(hXˆ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ŒUnbindable mount”h]”hŒUnbindable mount”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M;hjºubhý)�”}”(hŒ�A **unbindable mount** is defined as vfsmount that does not receive or forward any propagation events and cannot be bind mounted.”h]”(hŒA ”…”�”}”(hjÌh²hh³Nh´Nubjc)�”}”(hŒ**unbindable mount**”h]”hŒunbindable mount”…”�”}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjÌubhŒk is defined as vfsmount that does not receive or forward any propagation events and cannot be bind mounted.”…”�”}”(hjÌh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M=hjºubhý)�”}”(hŒState diagram:”h]”hŒState diagram:”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MBhjºubhý)�”}”(hŒcThe state diagram below explains the state transition of a mount, in response to various commands::”h]”hŒbThe state diagram below explains the state transition of a mount, in response to various commands:”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MDhjºubj™)�”}”(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&]”hÅhÆuh1j˜h³hÇh´MGhjºubhý)�”}”(hŒ¥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Œ©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.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M^hjºubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj9ubeh}”(h]”h ]”h"]”h$]”h&]”jÔŒarabic”jÖŒ(”j×jØuh1jOhjÙubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjÖh²hh³Nh´NubjU)�”}”(hXæBind 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ý)�”}”(hŒBind semantics”h]”hŒBind semantics”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mbhj8ubhý)�”}”(hŒ Consider the following command::”h]”hŒConsider the following command:”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mdhj8ubj™)�”}”(hŒmount --bind A/a B/b”h]”hŒmount --bind A/a B/b”…”�”}”hjXsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Mfhj8ubhý)�”}”(hŒ�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.”h]”hŒ£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.”…”�”}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhhj8ubhý)�”}”(hŒcThe outcome depends on the type of mount of 'A' and 'B'. The table below contains quick reference::”h]”hŒjThe outcome depends on the type of mount of ‘A’ and ‘B’. The table below contains quick reference:”…”�”}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mkhj8ubj™)�”}”(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 | **************************************************************************”…”�”}”hj‚sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Mnhj8ubhý)�”}”(hŒDetails:”h]”hŒDetails:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M{hj8ubjP)�”}”(hhh]”(jU)�”}”(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’.”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M}hj¡ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjžubjU)�”}”(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’.”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M†hj¹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjžubjU)�”}”(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’.”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŽhjÑubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjžubjU)�”}”(hŒR'A' is a unbindable mount and 'B' is a shared mount. This is a invalid operation. ”h]”hý)�”}”(hŒQ'A' is a unbindable mount and 'B' is a shared mount. This is a invalid operation.”h]”hŒY‘A’ is a unbindable mount and ‘B’ is a shared mount. This is a invalid operation.”…”�”}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M˜hjéubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjžubjU)�”}”(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’.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M›hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjžubjU)�”}”(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 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŸhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjžubjU)�”}”(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.”…”�”}”(hj5 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¤hj1 ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjžubjU)�”}”(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.”…”�”}”(hjM h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¬hjI ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjžubeh}”(h]”h ]”h"]”h$]”h&]”jÔj0jÖhj׌.”uh1jOhj8ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjÖh²hh³Nh´NubjU)�”}”(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ý)�”}”(hŒRbind semantics”h]”hŒRbind semantics”…”�”}”(hjr h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¯hjn ubhý)�”}”(hŒË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.”h]”hŒË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.”…”�”}”(hj€ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M±hjn ubhý)�”}”(hŒ‡If the source tree that is rbind has some unbindable mounts, then the subtree under the unbindable mount is pruned in the new location.”h]”hŒ‡If the source tree that is rbind has some unbindable mounts, then the subtree under the unbindable mount is pruned in the new location.”…”�”}”(hjŽ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mµhjn ubhý)�”}”(hŒeg:”h]”hŒeg:”…”�”}”(hjœ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¹hjn ubhý)�”}”(hŒ,let's say we have the following mount tree::”h]”hŒ-let’s say we have the following mount tree:”…”�”}”(hjª h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M»hjn ubj™)�”}”(hŒ" A / \ B C / \ / \ D E F G”h]”hŒ" A / \ B C / \ / \ D E F G”…”�”}”hj¸ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M½hjn 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Æ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÃhjn ubhý)�”}”(hŒIf this tree is rbound to say Z”h]”hŒIf this tree is rbound to say Z”…”�”••}”(hjÔ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÆhjn ubhý)�”}”(hŒ5We will have the following tree at the new location::”h]”hŒ4We will have the following tree at the new location:”…”�”}”(hjâ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÈhjn 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&]”hÅhÆuh1j˜h³hÇh´MÊhjn ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjÖh²hh³hÇh´NubjU)�”}”(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ý)�”}”(hŒMove semantics”h]”hŒMove semantics”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÔhj ubhý)�”}”(hŒ Consider the following command::”h]”hŒConsider the following command:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÖhj ubj™)�”}”(hŒmount --move A B/b”h]”hŒmount --move A B/b”…”�”}”hj$ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´MØhj ubhý)�”}”(hŒkwhere 'A' is the source mount, 'B' is the destination mount and 'b' is the dentry in the destination mount.”h]”hŒwwhere ‘A’ is the source mount, ‘B’ is the destination mount and ‘b’ is the dentry in the destination mount.”…”�”}”(hj2 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÚhj ubhý)�”}”(hŒcThe outcome depends on the type of the mount of 'A' and 'B'. The table below is a quick reference::”h]”hŒjThe outcome depends on the type of the mount of ‘A’ and ‘B’. The table below is a quick reference:”…”�”}”(hj@ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÝhj 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 | ***************************************************************************”…”�”}”hjN sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Màhj ubj©)�”}”(hŒ8moving a mount residing under a shared mount is invalid.”h]”hý)�”}”(hj^ h]”hŒ8moving a mount residing under a shared mount is invalid.”…”�”}”(hj` h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Míhj\ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj ubhý)�”}”(hŒDetails follow:”h]”hŒDetails follow:”…”�”}”(hjs h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mïhj ubjP)�”}”(hhh]”(jU)�”}”(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’.”…”�”}”(hjˆ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mñhj„ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThj� ubjU)�”}”(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  h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Múhjœ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThj� ubjU)�”}”(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¸ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj´ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThj� ubjU)�”}”(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Ð h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hjÌ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThj� ubjU)�”}”(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è h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjä ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThj� ubjU)�”}”(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 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjü ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThj� ubjU)�”}”(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 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThj� ubjU)�”}”(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.”…”�”}”(hj0 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj, ubah}”(h]”h ]”h"]”h$]”h&]”uh1jThj� ubeh}”(h]”h ]”h"]”h$]”h&]”jÔj0jÖhj×jg uh1jOhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjÖh²hh³Nh´NubjU)�”}”(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ý)�”}”(hŒMount semantics”h]”hŒMount semantics”…”�”}”(hjT h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M!hjP ubhý)�”}”(hŒ Consider the following command::”h]”hŒConsider the following command:”…”�”}”(hjb h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M#hjP ubj™)�”}”(hŒmount device B/b”h]”hŒmount device B/b”…”�”}”hjp sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M%hjP ubhý)�”}”(hŒL'B' is the destination mount and 'b' is the dentry in the destination mount.”h]”hŒT‘B’ is the destination mount and ‘b’ is the dentry in the destination mount.”…”�”}”(hj~ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M'hjP ubhý)�”}”(hŒuThe above operation is the same as bind operation with the exception that the source mount is always a private mount.”h]”hŒuThe above operation is the same as bind operation with the exception that the source mount is always a private mount.”…”�”}”(hjŒ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M*hjP ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjÖh²hh³hÇh´NubjU)�”}”(hX9Unmount 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' are unmounted as well, if every mount below them is also 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 a child mount that cannot be unmounted then that mount is not unmounted. But all other mounts are unmounted. A child mount that is itself unmounted by the same unmount propagation does not keep its parent mounted. However if 'C1' is supposed to be unmounted and 'C1' has some sub-mounts, the unmount fails. A lazy umount (MNT_DETACH) takes a whole tree. Every mount of the tree then propagates its unmount from its own parent as described above, so the mounts that receive propagation lose the corresponding trees as well. Documentation/filesystems/propagate_umount.txt has the precise rules, including the ones for locked mounts. ”h]”(hý)�”}”(hŒUnmount semantics”h]”hŒUnmount semantics”…”�”}”(hj¤ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M.hj  ubhý)�”}”(hŒ Consider the following command::”h]”hŒConsider the following command:”…”�”}”(hj² h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M0hj  ubj™)�”}”(hŒumount A”h]”hŒumount A”…”�”}”hjÀ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M2hj  ubhý)�”}”(hŒ8where 'A' is a mount mounted on mount 'B' at dentry 'b'.”h]”hŒDwhere ‘A’ is a mount mounted on mount ‘B’ at dentry ‘b’.”…”�”}”(hjÎ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M4hj  ubhý)�”}”(hŒÁIf mount 'B' is shared, then all most-recently-mounted mounts at dentry 'b' on mounts that receive propagation from mount 'B' are unmounted as well, if every mount below them is also unmounted.”h]”hŒÍIf mount ‘B’ is shared, then all most-recently-mounted mounts at dentry ‘b’ on mounts that receive propagation from mount ‘B’ are unmounted as well, if every mount below them is also unmounted.”…”�”}”(hjÜ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M6hj  ubhý)�”}”(hŒSExample: Let's say 'B1', 'B2', 'B3' are shared mounts that propagate to each other.”h]”hŒaExample: Let’s say ‘B1’, ‘B2’, ‘B3’ are shared mounts that propagate to each other.”…”�”}”(hjê h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M:hj  ubhý)�”}”(hŒelet's say 'A1', 'A2', 'A3' are first mounted at dentry 'b' on mount 'B1', 'B2' and 'B3' respectively.”h]”hŒƒlet’s say ‘A1’, ‘A2’, ‘A3’ are first mounted at dentry ‘b’ on mount ‘B1’, ‘B2’ and ‘B3’ respectively.”…”�”}”(hjø h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M=hj  ubhý)�”}”(hŒmlet's say 'C1', 'C2', 'C3' are next mounted at the same dentry 'b' on mount 'B1', 'B2' and 'B3' respectively.”h]”hŒ‹let’s say ‘C1’, ‘C2’, ‘C3’ are next mounted at the same dentry ‘b’ on mount ‘B1’, ‘B2’ and ‘B3’ respectively.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M@hj  ubhý)�”}”(hŒ„if 'C1' is unmounted, all the mounts that are most-recently-mounted on 'B1' and on the mounts that 'B1' propagates-to are unmounted.”h]”hŒ�if ‘C1’ is unmounted, all the mounts that are most-recently-mounted on ‘B1’ and on the mounts that ‘B1’ propagates-to are unmounted.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MChj  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" h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MFhj  ubhý)�”}”(hŒ/So all 'C1', 'C2' and 'C3' should be unmounted.”h]”hŒ;So all ‘C1’, ‘C2’ and ‘C3’ should be unmounted.”…”�”}”(hj0 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MIhj  ubhý)�”}”(hXMIf any of 'C2' or 'C3' has a child mount that cannot be unmounted then that mount is not unmounted. But all other mounts are unmounted. A child mount that is itself unmounted by the same unmount propagation does not keep its parent mounted. However if 'C1' is supposed to be unmounted and 'C1' has some sub-mounts, the unmount fails.”h]”hX]If any of ‘C2’ or ‘C3’ has a child mount that cannot be unmounted then that mount is not unmounted. But all other mounts are unmounted. A child mount that is itself unmounted by the same unmount propagation does not keep its parent mounted. However if ‘C1’ is supposed to be unmounted and ‘C1’ has some sub-mounts, the unmount fails.”…”�”}”(hj> h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MKhj  ubhý)�”}”(hXCA lazy umount (MNT_DETACH) takes a whole tree. Every mount of the tree then propagates its unmount from its own parent as described above, so the mounts that receive propagation lose the corresponding trees as well. Documentation/filesystems/propagate_umount.txt has the precise rules, including the ones for locked mounts.”h]”hXCA lazy umount (MNT_DETACH) takes a whole tree. Every mount of the tree then propagates its unmount from its own parent as described above, so the mounts that receive propagation lose the corresponding trees as well. Documentation/filesystems/propagate_umount.txt has the precise rules, including the ones for locked mounts.”…”�”}”(hjL h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MRhj  ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjÖh²hh³hÇh´NubjU)�”}”(hXÕClone 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ý)�”}”(hŒClone Namespace”h]”hŒClone Namespace”…”�”}”(hjd h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MXhj` ubhý)�”}”(hŒKA cloned namespace contains all the mounts as that of the parent namespace.”h]”hŒKA cloned namespace contains all the mounts as that of the parent namespace.”…”�”}”(hjr h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MZhj` ubhý)�”}”(hŒYLet's say 'A' and 'B' are the corresponding mounts in the parent and the child namespace.”h]”hŒcLet’s say ‘A’ and ‘B’ are the corresponding mounts in the parent and the child namespace.”…”�”}”(hj€ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M]hj` ubhý)�”}”(hŒRIf 'A' is shared, then 'B' is also shared and 'A' and 'B' propagate to each other.”h]”hŒbIf ‘A’ is shared, then ‘B’ is also shared and ‘A’ and ‘B’ propagate to each other.”…”�”}”(hjŽ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M`hj` ubhý)�”}”(hŒHIf 'A' is a slave mount of 'Z', then 'B' is also the slave mount of 'Z'.”h]”hŒXIf ‘A’ is a slave mount of ‘Z’, then ‘B’ is also the slave mount of ‘Z’.”…”�”}”(hjœ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mchj` ubhý)�”}”(hŒ;If 'A' is a private mount, then 'B' is a private mount too.”h]”hŒCIf ‘A’ is a private mount, then ‘B’ is a private mount too.”…”�”}”(hjª h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mfhj` ubhý)�”}”(hŒ?If 'A' is unbindable mount, then 'B' is a unbindable mount too.”h]”hŒGIf ‘A’ is unbindable mount, then ‘B’ is a unbindable mount too.”…”�”}”(hj¸ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhhj` ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjÖh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÔjÕjÖhj×jØuh1jOhjŸh²hh³hÇh´Kúubeh}”(h]”Œdetailed-semantics”ah ]”h"]”Œ5) detailed semantics”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KòubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ6) Quiz”h]”hŒ6) Quiz”…”�”}”(hjÝ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÚ h²hh³hÇh´MlubjP)�”}”(hhh]”(jU)�”}”(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ý)�”}”(hŒ5What is the result of the following command sequence?”h]”hŒ5What is the result of the following command sequence?”…”�”}”(hjò h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mnhjî ubj™)�”}”(hŒ_mount --bind /mnt /mnt mount --make-shared /mnt mount --bind /mnt /tmp mount --move /tmp /mnt/1”h]”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&]”hÅhÆuh1j˜h³hÇh´Mrhjî ubhý)�”}”(hŒ‰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Œ‰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?”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mwhjî ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjë h²hh³hÇh´NubjU)�”}”(hŒ®What 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ý)�”}”(hŒ5What is the result of the following command sequence?”h]”hŒ5What is the result of the following command sequence?”…”�”}”(hj& h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M|hj" ubj™)�”}”(hŒ9mount --make-rshared / mkdir -p /v/1 mount --rbind / /v/1”h]”hŒ9mount --make-rshared / mkdir -p /v/1 mount --rbind / /v/1”…”�”}”hj4 sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M€hj" 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?”…”�”}”(hjB h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M„hj" ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjë h²hh³hÇh´NubjU)�”}”(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ý)�”}”(hŒ5What is the result of the following command sequence?”h]”hŒ5What is the result of the following command sequence?”…”�”}”(hjZ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‡hjV ubj™)�”}”(hŒÍ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”h]”hŒÍ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”…”�”}”hjh sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M‹hjV 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’”…”�”}”(hjv h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M”hjV ubhý)�”}”(hŒ='B' is the slave of 'A' and 'C' is a slave of 'B' A -> B -> C”h]”hŒM‘B’ is the slave of ‘A’ and ‘C’ is a slave of ‘B’ A -> B -> C”…”�”}”(hj„ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M›hjV ubhý)�”}”(hŒ3at this point if we execute the following command::”h]”hŒ2at this point if we execute the following command:”…”�”}”(hj’ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MžhjV ubj™)�”}”(hŒmount --bind /bin /tmp/test”h]”hŒmount --bind /bin /tmp/test”…”�”}”hj  sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M hjV ubhý)�”}”(hŒThe mount is attempted on 'A'”h]”hŒ!The mount is attempted on ‘A’”…”�”}”(hj® h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¢hjV ubhý)�”}”(hŒ)will the mount propagate to 'B' and 'C' ?”h]”hŒ1will the mount propagate to ‘B’ and ‘C’ ?”…”�”}”(hj¼ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¤hjV 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Ê h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¦hjV ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjë h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÔjújÖhj×jg uh1jOhjÚ h²hh³hÇh´Mnubeh}”(h]”Œquiz”ah ]”h"]”Œ6) quiz”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MlubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ7) FAQ”h]”hŒ7) FAQ”…”�”}”(hjï h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjì h²hh³hÇh´MªubjP)�”}”(hhh]”(jU)�”}”(hŒàWhy 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ý)�”}”(hŒBWhy is bind mount needed? How is it different from symbolic links?”h]”hŒBWhy is bind mount needed? How is it different from symbolic links?”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¬hjubhý)�”}”(hŒ›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Œ›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.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M®hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjý h²hh³hÇh´NubjU)�”}”(hŒáWhy 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?”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M²hj&ubhý)�”}”(hŒ£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Œ£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?”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M´hj&ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjý h²hh³hÇh´NubjU)�”}”(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ý)�”}”(hŒWhy is unbindable mount needed?”h]”hŒWhy is unbindable mount needed?”…”�”}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¸hjLubhý)�”}”(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^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MºhjLubhý)�”}”(hŒÑ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.”h]”hŒÙ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.”…”�”}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M½hjLubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_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]”(hŒterm”“”)�”}”(hŒstep 1:”h]”hŒstep 1:”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´MËhj�ubhŒ definition”“”)�”}”(hhh]”(hý)�”}”(hŒDlet's say the root tree has just two directories with one vfsmount::”h]”hŒElet’s say the root tree has just two directories with one vfsmount:”…”�”}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÃhj—ubj™)�”}”(hŒ root / \ tmp usr”h]”hŒ root / \ tmp usr”…”�”}”hj¨sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´MÆhj—ubhý)�”}”(hŒIAnd we want to replicate the tree at multiple mountpoints under /root/tmp”h]”hŒIAnd we want to replicate the tree at multiple mountpoints under /root/tmp”…”�”}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÊhj—ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j•hj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MËhj|ubj€)�”}”(hXÛ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 ”h]”(j†)�”}”(hŒstep 2:”h]”hŒstep 2:”…”�”}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´MãhjÐubj–)�”}”(hhh]”(j™)�”}”(hŒHmount --make-shared /root mkdir -p /tmp/m1 mount --rbind /root /tmp/m1”h]”hŒHmount --make-shared /root mkdir -p /tmp/m1 mount --rbind /root /tmp/m1”…”�”}”hjåsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´MÑhjâubhý)�”}”(hŒ"the new tree now looks like this::”h]”hŒ!the new tree now looks like this:”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M×hjâubj™)�”}”(hŒM root / \ tmp usr / m1 / \ tmp usr / m1”h]”hŒM root / \ tmp usr / m1 / \ tmp usr / m1”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´MÙhjâubhý)�”}”(hŒit has two vfsmounts”h]”hŒit has two vfsmounts”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mãhjâubeh}”(h]”h ]”h"]”h$]”h&]”uh1j•hjÐubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mãhj|ubj€)�”}”(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]”(j†)�”}”(hŒstep 3:”h]”hŒstep 3:”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´Mÿhj)ubj–)�”}”(hhh]”(j™)�”}”(hŒ,mkdir -p /tmp/m2 mount --rbind /root /tmp/m2”h]”hŒ,mkdir -p /tmp/m2 mount --rbind /root /tmp/m2”…”�”}”hj>sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Mèhj;ubhý)�”}”(hŒ"the new tree now looks like this::”h]”hŒ!the new tree now looks like this:”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mëhj;ubj™)�”}”(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”h]”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”…”�”}”hjZsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Míhj;ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j•hj)ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mÿhj|ubj€)�”}”(hŒ’step 4: :: mkdir -p /tmp/m3 mount --rbind /root /tmp/m3 I won't draw the tree..but it has 24 vfsmounts ”h]”(j†)�”}”(hŒstep 4:”h]”hŒstep 4:”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´Mhjtubj–)�”}”(hhh]”(j™)�”}”(hŒ,mkdir -p /tmp/m3 mount --rbind /root /tmp/m3”h]”hŒ,mkdir -p /tmp/m3 mount --rbind /root /tmp/m3”…”�”}”hj‰sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Mhj†ubhý)�”}”(hŒ.I won't draw the tree..but it has 24 vfsmounts”h]”hŒ0I won’t draw the tree..but it has 24 vfsmounts”…”�”}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj†ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j•hjtubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mhj|ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjLubhý)�”}”(hŒ§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.”h]”hŒ§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.”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hjLubhý)�”}”(hŒ•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.”h]”hŒ•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.”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjLubj{)�”}”(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]”(j†)�”}”(hŒstep 1:”h]”hŒstep 1:”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´MhjÖubj–)�”}”(hhh]”(hý)�”}”(hŒDlet's say the root tree has just two directories with one vfsmount::”h]”hŒElet’s say the root tree has just two directories with one vfsmount:”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjèubj™)�”}”(hŒª root / \ tmp usr How do we set up the same tree at multiple locations under /root/tmp”h]”hŒª root / \ tmp usr How do we set up the same tree at multiple locations under /root/tmp”…”�”}”hjùsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´Mhjèubeh}”(h]”h ]”h"]”h$]”h&]”uh1j•hjÖubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MhjÓubj€)�”}”(hXü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 ”h]”(j†)�”}”(hŒstep 2:”h]”hŒstep 2:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´M2hjubj–)�”}”(hhh]”(j™)�”}”(hŒ�mount --bind /root/tmp /root/tmp mount --make-rshared /root mount --make-unbindable /root/tmp mkdir -p /tmp/m1 mount --rbind /root /tmp/m1”h]”hŒ�mount --bind /root/tmp /root/tmp mount --make-rshared /root mount --make-unbindable /root/tmp mkdir -p /tmp/m1 mount --rbind /root /tmp/m1”…”�”}”hj(sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M!hj%ubhý)�”}”(hŒ"the new tree now looks like this::”h]”hŒ!the new tree now looks like this:”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M*hj%ubj™)�”}”(hŒ@ root / \ tmp usr / m1 / \ tmp usr”h]”hŒ@ root / \ tmp usr / m1 / \ tmp usr”…”�”}”hjDsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M,hj%ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j•hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M2hjÓubj€)�”}”(hX‡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 ”h]”(j†)�”}”(hŒstep 3:”h]”hŒstep 3:”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´MBhj^ubj–)�”}”(hhh]”(j™)�”}”(hŒ,mkdir -p /tmp/m2 mount --rbind /root /tmp/m2”h]”hŒ,mkdir -p /tmp/m2 mount --rbind /root /tmp/m2”…”�”}”hjssbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M7hjpubhý)�”}”(hŒ"the new tree now looks like this::”h]”hŒ!the new tree now looks like this:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M:hjpubj™)�”}”(hŒ[ root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usr”h]”hŒ[ root / \ tmp usr / \ m1 m2 / \ / \ tmp usr tmp usr”…”�”}”hj�sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´M<hjpubeh}”(h]”h ]”h"]”h$]”h&]”uh1j•hj^ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MBhjÓubj€)�”}”(hXÀ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]”(j†)�”}”(hŒstep 4:”h]”hŒstep 4:”…”�”}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´MRhj©ubj–)�”}”(hhh]”(j™)�”}”(hŒ,mkdir -p /tmp/m3 mount --rbind /root /tmp/m3”h]”hŒ,mkdir -p /tmp/m3 mount --rbind /root /tmp/m3”…”�”}”hj¾sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´MGhj»ubhý)�”}”(hŒ"the new tree now looks like this::”h]”hŒ!the new tree now looks like this:”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MJhj»ubj™)�”}”(hŒ” root / \ tmp usr / \ \ m1 m2 m3 / \ / \ / \ tmp usr tmp usr tmp usr”h]”hŒ” root / \ tmp usr / \ \ m1 m2 m3 / \ / \ / \ tmp usr tmp usr tmp usr”…”�”}”hjÚsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´MLhj»ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j•hj©ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MRhjÓubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjLubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjý h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÔj0jÖhj×jg uh1jOhjì h²hh³hÇh´M¬ubeh}”(h]”Œfaq”ah ]”h"]”Œ7) faq”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MªubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ8) Implementation”h]”hŒ8) Implementation”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´MUubjP)�”}”(hhh]”(jU)�”}”(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Œ Datastructure”h]”hŒ Datastructure”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MWhj"ubhý)�”}”(hŒ5Several new fields are introduced to struct vfsmount:”h]”hŒ5Several new fields are introduced to struct vfsmount:”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MYhj"ubj{)�”}”(hhh]”(j€)�”}”(hŒg->mnt_share Links together all the mount to/from which this vfsmount send/receives propagation events. ”h]”(j†)�”}”(hŒ ->mnt_share”h]”hŒ ->mnt_share”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´M]hjEubj–)�”}”(hhh]”hý)�”}”(hŒZLinks together all the mount to/from which this vfsmount send/receives propagation events.”h]”hŒZLinks together all the mount to/from which this vfsmount send/receives propagation events.”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M\hjWubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjEubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M]hjBubj€)�”}”(hŒL->mnt_slave_list Links all the mounts to which this vfsmount propagates to. ”h]”(j†)�”}”(hŒ->mnt_slave_list”h]”hŒ->mnt_slave_list”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´Mahjtubj–)�”}”(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.”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M`hj†ubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjtubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MahjBubj€)�”}”(hŒR->mnt_slave Links together all the slaves that its master vfsmount propagates to. ”h]”(j†)�”}”(hŒ ->mnt_slave”h]”hŒ ->mnt_slave”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´Mehj£ubj–)�”}”(hhh]”hý)�”}”(hŒELinks together all the slaves that its master vfsmount propagates to.”h]”hŒELinks together all the slaves that its master vfsmount propagates to.”…”�”}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mdhjµubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hj£ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MehjBubj€)�”}”(hŒZ->mnt_master Points to the master vfsmount from which this vfsmount receives propagation. ”h]”(j†)�”}”(hŒ ->mnt_master”h]”hŒ ->mnt_master”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´MihjÒubj–)�”}”(hhh]”hý)�”}”(hŒLPoints to the master vfsmount from which this vfsmount receives propagation.”h]”hŒLPoints to the master vfsmount from which this vfsmount receives propagation.”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhhjäubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjÒubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MihjBubj€)�”}”(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]”(j†)�”}”(hŒ ->mnt_flags”h]”hŒ ->mnt_flags”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´Mohjubj–)�”}”(hhh]”hý)�”}”(hŒÇ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]”hŒÇ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.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mlhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MohjBubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhj"ubhý)�”}”(hŒPAll the shared vfsmounts in a peer group form a cyclic list through ->mnt_share.”h]”hŒPAll the shared vfsmounts in a peer group form a cyclic list through ->mnt_share.”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mqhj"ubhý)�”}”(hŒ†All vfsmounts with the same ->mnt_master form on a cyclic list anchored in ->mnt_master->mnt_slave_list and going through ->mnt_slave.”h]”hŒ†All vfsmounts with the same ->mnt_master form on a cyclic list anchored in ->mnt_master->mnt_slave_list and going through ->mnt_slave.”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mthj"ubhý)�”}”(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.”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mwhj"ubhý)�”}”(hŒ…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.”h]”hŒ…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.”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M~hj"ubhý)�”}”(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.”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hj"ubj©)�”}”(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]”hŒ�Though it looks like a forest, if we consider all the shared mounts as a conceptual entity called ‘pnode’, it becomes a tree.”…”�”}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M„hj|ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj"ubj™)�”}”(hŒq A <--> B <--> C <---> D /|\ /| |\ / F G J K H I / E<-->K /|\ M L N”h]”hŒq A <--> B <--> C <---> D /|\ /| |\ / F G J K H I / E<-->K /|\ M L N”…”�”}”hj”sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j˜h³hÇh´MŠhj"ubhý)�”}”(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’”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M’hj"ubhý)�”}”(hŒ=A's ->mnt_share links with the ->mnt_share of 'B' 'C' and 'D'”h]”hŒKA’s ->mnt_share links with the ->mnt_share of ‘B’ ‘C’ and ‘D’”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M˜hj"ubhý)�”}”(hŒDA's ->mnt_slave_list links with ->mnt_slave of 'E', 'K', 'F' and 'G'”h]”hŒVA’s ->mnt_slave_list links with ->mnt_slave of ‘E’, ‘K’, ‘F’ and ‘G’”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mšhj"ubhý)�”}”(hŒ+E's ->mnt_share links with ->mnt_share of K”h]”hŒ-E’s ->mnt_share links with ->mnt_share of K”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mœhj"ubhý)�”}”(hŒJ'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’”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mžhj"ubhý)�”}”(hŒE'M', 'L', 'N' have their ->mnt_master point to struct vfsmount of 'K'”h]”hŒU‘M’, ‘L’, ‘N’ have their ->mnt_master point to struct vfsmount of ‘K’”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hj"ubhý)�”}”(hŒ?K's ->mnt_slave_list links with ->mnt_slave of 'M', 'L' and 'N'”h]”hŒMK’s ->mnt_slave_list links with ->mnt_slave of ‘M’, ‘L’ and ‘N’”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¢hj"ubhý)�”}”(hŒ:C's ->mnt_slave_list links with ->mnt_slave of 'J' and 'K'”h]”hŒDC’s ->mnt_slave_list links with ->mnt_slave of ‘J’ and ‘K’”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¤hj"ubhý)�”}”(hŒ5J and K's ->mnt_master points to struct vfsmount of C”h]”hŒ7J and K’s ->mnt_master points to struct vfsmount of C”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¦hj"ubhý)�”}”(hŒFand finally D's ->mnt_slave_list links with ->mnt_slave of 'H' and 'I'”h]”hŒPand finally D’s ->mnt_slave_list links with ->mnt_slave of ‘H’ and ‘I’”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¨hj"ubhý)�”}”(hŒG'H' and 'I' have their ->mnt_master pointing to struct vfsmount of 'D'.”h]”hŒS‘H’ and ‘I’ have their ->mnt_master pointing to struct vfsmount of ‘D’.”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mªhj"ubhý)�”}”(hŒ;NOTE: The propagation tree is orthogonal to the mount tree.”h]”hŒ;NOTE: The propagation tree is orthogonal to the mount tree.”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M­hj"ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjh²hh³hÇh´NubjU)�”}”(hXóLocking: ->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ý)�”}”(hŒLocking:”h]”hŒLocking:”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¯hjPubhý)�”}”(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).”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M±hjPubhý)�”}”(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.”…”�”}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M´hjPubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjh²hh³hÇh´NubjU)�”}”(hXÞAlgorithm: 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:”…”�”}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M»hj„ubhý)�”}”(hŒ?The crux of the implementation resides in rbind/move operation.”h]”hŒ?The crux of the implementation resides in rbind/move operation.”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M½hj„ubhý)�”}”(hŒnThe overall algorithm breaks the operation into 3 phases: (look at attach_recursive_mnt() and propagate_mnt())”h]”hŒnThe overall algorithm breaks the operation into 3 phases: (look at attach_recursive_mnt() and propagate_mnt())”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¿hj„ubjP)�”}”(hhh]”(jU)�”}”(hXý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. ”h]”(hý)�”}”(hŒPrepare phase.”h]”hŒPrepare phase.”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÂhjµubhý)�”}”(hŒ"For each mount in the source tree:”h]”hŒ"For each mount in the source tree:”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÄhjµubjP)�”}”(hhh]”(jU)�”}”(hŒ„Create the necessary number of mount trees to be attached to each of the mounts that receive propagation from the destination mount.”h]”hý)�”}”(hŒ„Create the necessary number of mount trees to be attached to each of the mounts that receive propagation from the destination mount.”h]”hŒ„Create the necessary number of mount trees to be attached to each of the mounts that receive propagation from the destination mount.”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÆhjØubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjÕubjU)�”}”(hŒjDo not attach any of the trees to its destination. However note down its ->mnt_parent and ->mnt_mountpoint”h]”hý)�”}”(hŒjDo not attach any of the trees to its destination. However note down its ->mnt_parent and ->mnt_mountpoint”h]”hŒjDo not attach any of the trees to its destination. However note down its ->mnt_parent and ->mnt_mountpoint”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÉhjðubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjÕubjU)�”}”(hŒwLink all the new mounts to form a propagation tree that is identical to the propagation tree of the destination mount. ”h]”hý)�”}”(hŒvLink all the new mounts to form a propagation tree that is identical to the propagation tree of the destination mount.”h]”hŒvLink all the new mounts to form a propagation tree that is identical to the propagation tree of the destination mount.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MËhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjÕubeh}”(h]”h ]”h"]”h$]”h&]”jÔjÕjÖhj×jØuh1jOhjµubhý)�”}”(hŒ•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”h]”hŒ�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”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÏhjµubhý)�”}”(hŒyAlso there should be 'm' new mount trees, where 'm' is the number of mounts to which the destination mount propagates to.”h]”hŒ�Also there should be ‘m’ new mount trees, where ‘m’ is the number of mounts to which the destination mount propagates to.”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÓhjµubhý)�”}”(hŒ6If any memory allocations fail, go to the abort phase.”h]”hŒ6If any memory allocations fail, go to the abort phase.”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M×hjµubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj²ubjU)�”}”(hŒYCommit phase. Attach each of the mount trees to their corresponding destination mounts. ”h]”(hý)�”}”(hŒ Commit phase.”h]”hŒ Commit phase.”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÙhjVubhý)�”}”(hŒIAttach each of the mount trees to their corresponding destination mounts.”h]”hŒIAttach each of the mount trees to their corresponding destination mounts.”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÛhjVubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj²ubjU)�”}”(hŒ2Abort phase. Delete all the newly created trees. ”h]”(hý)�”}”(hŒ Abort phase.”h]”hŒ Abort phase.”…”�”}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÞhj|ubhý)�”}”(hŒ#Delete all the newly created trees.”h]”hŒ#Delete all the newly created trees.”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Màhj|ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThj²ubeh}”(h]”h ]”h"]”h$]”h&]”jÔj0jÖhj×jg uh1jOhj„ubj©)�”}”(hŒEall the propagation related functionality resides in the file pnode.c”h]”hý)�”}”(hjªh]”hŒEall the propagation related functionality resides in the file pnode.c”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mãhj¨ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj„ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jThjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÔjújÖhj×jØuh1jOhjh²hh³hÇh´MWubhŒ transition”“”)�”}”(hŒH------------------------------------------------------------------------”h]”h}”(h]”h ]”h"]”h$]”h&]”uh1jËh³hÇh´Mæhjh²hubhý)�”}”(hŒHversion 0.1 (created the initial document, Ram Pai linuxram@us.ibm.com)”h]”(hŒ4version 0.1 (created the initial document, Ram Pai ”…”�”}”(hj×h²hh³Nh´NubhŒ reference”“”)�”}”(hŒlinuxram@us.ibm.com”h]”hŒlinuxram@us.ibm.com”…”�”}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:linuxram@us.ibm.com”uh1jßhj×ubhŒ)”…”�”}”(hj×h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mèhjh²hubhý)�”}”(hŒ1version 0.2 (Incorporated comments from Al Viro)”h]”hŒ1version 0.2 (Incorporated comments from Al Viro)”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mêhjh²hubeh}”(h]”Œimplementation”ah ]”h"]”Œ8) implementation”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MUubeh}”(h]”Œshared-subtrees”ah ]”h"]”Œshared subtrees”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j<Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjj-j*jÞjÛjjjœj™j× jÔ jé jæ j jjj uŒ nametypes”}”(j‰j-‰jÞ‰j‰jœ‰j× ‰jé ‰j ‰j‰uh}”(jhÊj*hëjÛj0jjáj™jjÔ jŸjæ jÚ jjì j juŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”hŒsystem_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)”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühj ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1jžhjh²hh³hÇh´KÏubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.