mount.2: Describe the concept of "parent mounts"

Reported-by: Reid Priedhorsky <reidpr@lanl.gov>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2019-10-08 17:26:51 +02:00
parent e0e0ba7d01
commit 459fe99546
1 changed files with 17 additions and 0 deletions

View File

@ -889,6 +889,23 @@ subsequently creates) and vice versa.
For further details on mount namespaces, see
.BR mount_namespaces (7).
.\"
.SS Parental relationship between mount points
Each mount point has a parent mount point.
The overall parental relationship of all mount points defines
the single directory hierarchy seen by the processes within a mount namespace.
.PP
The parent of a new mount point is defined when the mount point is created.
In the usual case,
the parent of a new mount is the mount point of the filesystem
containing the directory or file at which the new mount is attached.
In the case where a new mount is stacked on top of an existing mount,
the parent of the new mount is the previous mount that was stacked
at that location.
.PP
The parental relationship between mount points can be discovered via the
.I /proc/[pid]/mountinfo
file (see below).
.\"
.SS /proc/[pid]/mounts and /proc/[pid]/mountinfo
The Linux-specific
.I /proc/[pid]/mounts