Skip to content

Commit 16c01b2

Browse files
bergwolftorvalds
authored andcommitted
doc/filesystems: more mount cleanups
Documentation/filesystems/sharedsubtree.txt needs updating because the mount command in util-linux package is well aware of shared subtree features now. The patch also fixes two typos in sharedsubtree.txt. Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0288b95 commit 16c01b2

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Documentation/filesystems/sharedsubtree.txt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Shared Subtrees
44
Contents:
55
1) Overview
66
2) Features
7-
3) smount command
7+
3) Setting mount states
88
4) Use-case
99
5) Detailed semantics
1010
6) Quiz
@@ -135,10 +135,15 @@ replicas continue to be exactly same.
135135
Binding a unbindable mount is a invalid operation.
136136

137137

138-
3) smount command
138+
3) Setting mount states
139139

140-
Modern mount(8) command is aware of shared subtree features,
141-
so use it instead of the 'smount' command. [source code removed]
140+
The mount command (util-linux package) can be used to set mount
141+
states:
142+
143+
mount --make-shared mountpoint
144+
mount --make-slave mountpoint
145+
mount --make-private mountpoint
146+
mount --make-unbindable mountpoint
142147

143148

144149
4) Use cases
@@ -209,7 +214,7 @@ replicas continue to be exactly same.
209214
mount --rbind / /view/v3
210215
mount --rbind / /view/v4
211216

212-
and if /usr has a versioning filesystem mounted, than that
217+
and if /usr has a versioning filesystem mounted, then that
213218
mount appears at /view/v1/usr, /view/v2/usr, /view/v3/usr and
214219
/view/v4/usr too
215220

@@ -249,7 +254,7 @@ replicas continue to be exactly same.
249254

250255
For example:
251256
mount --make-shared /mnt
252-
mount --bin /mnt /tmp
257+
mount --bind /mnt /tmp
253258

254259
The mount at /mnt and that at /tmp are both shared and belong
255260
to the same peer group. Anything mounted or unmounted under

0 commit comments

Comments
 (0)