linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 3/5] Documentation: sharedsubtree: Don't repeat lists with explanation
Date: Tue, 19 Aug 2025 13:12:51 +0700	[thread overview]
Message-ID: <20250819061254.31220-4-bagasdotme@gmail.com> (raw)
In-Reply-To: <20250819061254.31220-1-bagasdotme@gmail.com>

Don't repeat lists only mentioning the items when a corresponding list
with item's explanations suffices.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/filesystems/sharedsubtree.rst | 106 ++++++++------------
 1 file changed, 44 insertions(+), 62 deletions(-)

diff --git a/Documentation/filesystems/sharedsubtree.rst b/Documentation/filesystems/sharedsubtree.rst
index 7ad5101b4c03ad..64858ff0471b81 100644
--- a/Documentation/filesystems/sharedsubtree.rst
+++ b/Documentation/filesystems/sharedsubtree.rst
@@ -31,15 +31,10 @@ and versioned filesystem.
 -----------
 
 Shared subtree provides four different flavors of mounts; struct vfsmount to be
-precise
-
-	a. shared mount
-	b. slave mount
-	c. private mount
-	d. unbindable mount
+precise:
 
 
-a) A shared mount can be replicated to as many mountpoints and all the
+a) A **shared mount** can be replicated to as many mountpoints and all the
    replicas continue to be exactly same.
 
 	Here is an example:
@@ -83,7 +78,7 @@ a) A shared mount can be replicated to as many mountpoints and all the
 	contents will be visible under /tmp/a too.
 
 
-b) A slave mount is like a shared mount except that mount and umount events
+b) A **slave mount** is like a shared mount except that mount and umount events
    only propagate towards it.
 
 	All slave mounts have a master mount which is a shared.
@@ -131,12 +126,13 @@ b) A slave mount is like a shared mount except that mount and umount events
 	/mnt
 
 
-c) A private mount does not forward or receive propagation.
+c) A **private mount** does not forward or receive propagation.
 
 	This is the mount we are familiar with. Its the default type.
 
 
-d) A unbindable mount is a unbindable private mount
+d) An **unbindable mount** is, as the name suggests, an unbindable private
+   mount.
 
 	let's say we have a mount at /mnt and we make it unbindable::
 
@@ -252,24 +248,18 @@ d) A unbindable mount is a unbindable private mount
 
 a) Mount states
 
-	A given mount can be in one of the following states
-
-	1) shared
-	2) slave
-	3) shared and slave
-	4) private
-	5) unbindable
-
-	A 'propagation event' is defined as event generated on a vfsmount
+	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
+	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'.
+		A **shared mount** is defined as a vfsmount that belongs to a
+		peer group.
 
 		For example::
 
@@ -284,7 +274,7 @@ a) Mount states
 
 	(2) Slave mounts
 
-		A 'slave mount' is defined as a vfsmount that receives
+		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
@@ -299,7 +289,7 @@ a) Mount states
 
 	(3) Shared and Slave
 
-		A vfsmount can be both shared as well as slave.  This state
+		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
@@ -318,12 +308,12 @@ a) Mount states
 
 	(4) Private mount
 
-		A 'private mount' is defined as vfsmount that does not
+		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
+		A **unbindable mount** is defined as vfsmount that does not
 		receive or forward any propagation events and cannot
 		be bind mounted.
 
@@ -854,31 +844,26 @@ g) Clone Namespace
 
 A) Datastructure
 
-	4 new fields are introduced to struct vfsmount:
-
-	*   ->mnt_share
-	*   ->mnt_slave_list
-	*   ->mnt_slave
-	*   ->mnt_master
+	Several new fields are introduced to struct vfsmount:
 
 	->mnt_share
-		links together all the mount to/from which this vfsmount
+		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
+		Links all the mounts to which this vfsmount propagates
 		to.
 
 	->mnt_slave
-		links together all the slaves that its master vfsmount
+		Links together all the slaves that its master vfsmount
 		propagates to.
 
 	->mnt_master
-		points to the master vfsmount from which this vfsmount
+		Points to the master vfsmount from which this vfsmount
 		receives propagation.
 
 	->mnt_flags
-		takes two more flags to indicate the propagation status of
+		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.
@@ -960,39 +945,36 @@ C) Algorithm:
 	The overall algorithm breaks the operation into 3 phases: (look at
 	attach_recursive_mnt() and propagate_mnt())
 
-	1. prepare phase.
-	2. commit phases.
-	3. abort phases.
+	1. Prepare phase.
 
-	Prepare phase:
+	   For each mount in the source tree:
 
-	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.
 
-		   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
 
-		   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.
 
-		   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.
 
-		   if any memory allocations fail, go to the abort phase.
+	2. Commit phase.
 
-	Commit phase
-		attach each of the mount trees to their corresponding
-		destination mounts.
+	   Attach each of the mount trees to their corresponding
+	   destination mounts.
 
-	Abort phase
-		delete all the newly created trees.
+	3. Abort phase.
+	   Delete all the newly created trees.
 
 	.. Note::
 	   all the propagation related functionality resides in the file pnode.c
-- 
An old man doll... just what I always wanted! - Clara


  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 ` [PATCH 1/5] Documentation: sharedsubtree: Format remaining of shell snippets as literal code blcoks Bagas Sanjaya
2025-08-19  6:12 ` [PATCH 2/5] Documentation: sharedsubtree: Use proper enumerator sequence for enumerated lists Bagas Sanjaya
2025-08-19  6:12 ` Bagas Sanjaya [this message]
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-4-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).