From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Documentation <linux-doc@vger.kernel.org>,
Linux Filesystems Development <linux-fsdevel@vger.kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
Bagas Sanjaya <bagasdotme@gmail.com>,
Christian Brauner <brauner@kernel.org>,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Randy Dunlap <rdunlap@infradead.org>
Subject: [PATCH 1/5] Documentation: sharedsubtree: Format remaining of shell snippets as literal code blcoks
Date: Tue, 19 Aug 2025 13:12:49 +0700 [thread overview]
Message-ID: <20250819061254.31220-2-bagasdotme@gmail.com> (raw)
In-Reply-To: <20250819061254.31220-1-bagasdotme@gmail.com>
Fix formatting inconsistency of shell snippets by wrapping the remaining
of them in literal code blocks.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
Documentation/filesystems/sharedsubtree.rst | 68 +++++++++++----------
1 file changed, 37 insertions(+), 31 deletions(-)
diff --git a/Documentation/filesystems/sharedsubtree.rst b/Documentation/filesystems/sharedsubtree.rst
index 1cf56489ed484d..06497c4455b41d 100644
--- a/Documentation/filesystems/sharedsubtree.rst
+++ b/Documentation/filesystems/sharedsubtree.rst
@@ -90,37 +90,42 @@ replicas continue to be exactly same.
Here is an example:
- Let's say /mnt has a mount which is shared.
- # mount --make-shared /mnt
+ Let's say /mnt has a mount which is shared::
- Let's bind mount /mnt to /tmp
- # mount --bind /mnt /tmp
+ # mount --make-shared /mnt
+
+ Let's bind mount /mnt to /tmp::
+
+ # mount --bind /mnt /tmp
the new mount at /tmp becomes a shared mount and it is a replica of
the mount at /mnt.
- Now let's make the mount at /tmp; a slave of /mnt
- # mount --make-slave /tmp
+ Now let's make the mount at /tmp; a slave of /mnt::
- let's mount /dev/sd0 on /mnt/a
- # mount /dev/sd0 /mnt/a
+ # mount --make-slave /tmp
- #ls /mnt/a
- t1 t2 t3
+ let's mount /dev/sd0 on /mnt/a::
- #ls /tmp/a
- t1 t2 t3
+ # mount /dev/sd0 /mnt/a
+
+ # ls /mnt/a
+ t1 t2 t3
+
+ # ls /tmp/a
+ t1 t2 t3
Note the mount event has propagated to the mount at /tmp
- However let's see what happens if we mount something on the mount at /tmp
+ However let's see what happens if we mount something on the mount at
+ /tmp::
- # mount /dev/sd1 /tmp/b
+ # mount /dev/sd1 /tmp/b
- #ls /tmp/b
- s1 s2 s3
+ # ls /tmp/b
+ s1 s2 s3
- #ls /mnt/b
+ # ls /mnt/b
Note how the mount event has not propagated to the mount at
/mnt
@@ -137,7 +142,7 @@ replicas continue to be exactly same.
# mount --make-unbindable /mnt
- Let's try to bind mount this mount somewhere else::
+ Let's try to bind mount this mount somewhere else::
# mount --bind /mnt /tmp
mount: wrong fs type, bad option, bad superblock on /mnt,
@@ -471,9 +476,9 @@ replicas continue to be exactly same.
5d) Move semantics
- Consider the following command
+ Consider the following command::
- mount --move A B/b
+ 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.
@@ -663,9 +668,9 @@ replicas continue to be exactly same.
'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
+ at this point if we execute the following command::
- mount --bind /bin /tmp/test
+ mount --bind /bin /tmp/test
The mount is attempted on 'A'
@@ -706,8 +711,8 @@ replicas continue to be exactly same.
/ \
tmp usr
- And we want to replicate the tree at multiple
- mountpoints under /root/tmp
+ And we want to replicate the tree at multiple
+ mountpoints under /root/tmp
step 2:
::
@@ -731,7 +736,7 @@ replicas continue to be exactly same.
/
m1
- it has two vfsmounts
+ it has two vfsmounts
step 3:
::
@@ -739,7 +744,7 @@ replicas continue to be exactly same.
mkdir -p /tmp/m2
mount --rbind /root /tmp/m2
- the new tree now looks like this::
+ the new tree now looks like this::
root
/ \
@@ -759,14 +764,15 @@ replicas continue to be exactly same.
/ \
m1 m2
- it has 6 vfsmounts
+ 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
+ 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].
@@ -785,8 +791,8 @@ replicas continue to be exactly same.
/ \
tmp usr
- How do we set up the same tree at multiple locations under
- /root/tmp
+ How do we set up the same tree at multiple locations under
+ /root/tmp
step 2:
::
--
An old man doll... just what I always wanted! - Clara
next prev parent reply other threads:[~2025-08-19 6:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 6:12 [PATCH 0/5] Documentation: sharedsubtree: reST massaging Bagas Sanjaya
2025-08-19 6:12 ` Bagas Sanjaya [this message]
2025-08-19 6:12 ` [PATCH 2/5] Documentation: sharedsubtree: Use proper enumerator sequence for enumerated lists Bagas Sanjaya
2025-08-19 6:12 ` [PATCH 3/5] Documentation: sharedsubtree: Don't repeat lists with explanation Bagas Sanjaya
2025-08-19 6:12 ` [PATCH 4/5] Documentation: sharedsubtree: Align text Bagas Sanjaya
2025-08-19 6:12 ` [PATCH 5/5] Documentation: sharedsubtree: Convert notes to note directive Bagas Sanjaya
2025-08-29 22:41 ` [PATCH 0/5] Documentation: sharedsubtree: reST massaging Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250819061254.31220-2-bagasdotme@gmail.com \
--to=bagasdotme@gmail.com \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).