From 63b0b1a34115e3ac4981d93451302f11ca45c96c Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 20 Aug 2018 16:24:20 +0200 Subject: [PATCH] mount.2: Clearly distinguish per-mount-point vs per-superblock mount flags Signed-off-by: Michael Kerrisk --- man2/mount.2 | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/man2/mount.2 b/man2/mount.2 index c6560065e..daaf158e1 100644 --- a/man2/mount.2 +++ b/man2/mount.2 @@ -281,21 +281,46 @@ flag to .BR open (2) was specified for all file opens to this filesystem). .PP -From Linux 2.4 onward, the +From Linux 2.4 onward, some of the above flags are +settable on a per-mount basis, +while others apply to the superblock of the mounted filesystem, +meaning that all mounts of the same filesystem share those flags. +(Previously, all of the flags were per-superblock.) +.PP +The per-mount-point flags are as follows: +.IP * 3 +Since Linux 2.4: .BR MS_NODEV ", " MS_NOEXEC ", and " MS_NOSUID flags are settable on a per-mount-point basis. -From kernel 2.6.16 onward, +.IP * +Since Linux 2.6.16: .B MS_NOATIME and -.B MS_NODIRATIME -are also settable on a per-mount-point basis. -The -.B MS_RELATIME -flag is also settable on a per-mount-point basis. +.BR MS_NODIRATIME . +.IP * +Since Linux 2.6.20: +.BR MS_RELATIME . +.PP +The following flags are per-superblock: +.BR MS_DIRSYNC , +.BR MS_LAZYTIME , +.BR MS_MANDLOCK , +.BR MS_MS_SILENT , +and +.BR MS_SYNCHRONOUS . +.\" And MS_I_VERSION? +The inital settings of these flags are determined on the first +mount of the filesystem, and will be shared by all subsequent mounts +of the same filesystem. +Subsequently, the settings of the flags can be changed +via a remount operation (see below). +Such changes will be visible via all mount points associated +with the filesystem. +.PP Since Linux 2.6.16, .B MS_RDONLY can be set or cleared on a per-mount-point basis as well as on -the underlying filesystem. +the underlying filesystem superblock. The mounted filesystem will be writable only if neither the filesystem nor the mountpoint are flagged as read-only. .\"