From: Aleksa Sarai <cyphar@cyphar.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: "Michael T. Kerrisk" <mtk.manpages@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jan Kara <jack@suse.cz>, Askar Safin <safinaskar@zohomail.com>,
"G. Branden Robinson" <g.branden.robinson@gmail.com>,
linux-man@vger.kernel.org, linux-api@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
David Howells <dhowells@redhat.com>,
Christian Brauner <brauner@kernel.org>,
Aleksa Sarai <cyphar@cyphar.com>
Subject: [PATCH v4 10/10] man/man2/{fsconfig,mount_setattr}.2: add note about attribute-parameter distinction
Date: Fri, 19 Sep 2025 11:59:51 +1000 [thread overview]
Message-ID: <20250919-new-mount-api-v4-10-1261201ab562@cyphar.com> (raw)
In-Reply-To: <20250919-new-mount-api-v4-0-1261201ab562@cyphar.com>
This was not particularly well documented in mount(8) nor mount(2), and
since this is a fairly notable aspect of the new mount API, we should
probably add some words about it.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
---
man/man2/fsconfig.2 | 12 ++++++++++++
man/man2/mount_setattr.2 | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+)
diff --git a/man/man2/fsconfig.2 b/man/man2/fsconfig.2
index 5a18e08c700ac93aa22c341b4134944ee3c38d0b..d827a7b96e08284fb025f94c3348a4acc4571b7d 100644
--- a/man/man2/fsconfig.2
+++ b/man/man2/fsconfig.2
@@ -579,6 +579,18 @@ .SS Generic filesystem parameters
Linux Security Modules (LSMs)
are also generic with respect to the underlying filesystem.
See the documentation for the LSM you wish to configure for more details.
+.SS Mount attributes and filesystem parameters
+Some filesystem parameters
+(traditionally associated with
+.BR mount (8)-style
+options)
+have a sibling mount attribute
+with superficially similar user-facing behaviour.
+.P
+For a description of the distinction between
+mount attributes and filesystem parameters,
+see the "Mount attributes and filesystem parameters" subsection of
+.BR mount_setattr (2).
.SH CAVEATS
.SS Filesystem parameter types
As a result of
diff --git a/man/man2/mount_setattr.2 b/man/man2/mount_setattr.2
index b27db5b96665cfb0c387bf5b60776d45e0139956..f7d0b96fddf97698e36cab020f1d695783143025 100644
--- a/man/man2/mount_setattr.2
+++ b/man/man2/mount_setattr.2
@@ -790,6 +790,46 @@ .SS ID-mapped mounts
.BR chown (2)
system call changes the ownership globally and permanently.
.\"
+.SS Mount attributes and filesystem parameters
+Some mount attributes
+(traditionally associated with
+.BR mount (8)-style
+options)
+have a sibling mount attribute
+with superficially similar user-facing behaviour.
+For example, the
+.I -o ro
+option to
+.BR mount (8)
+can refer to the
+"read-only" filesystem parameter,
+or the "read-only" mount attribute.
+Both of these result in mount objects becoming read-only,
+but they do have different behaviour.
+.P
+The distinction between these two kinds of option is that
+mount object attributes are applied per-mount-object
+(allowing different mount objects
+derived from a given filesystem instance
+to have different attributes),
+while filesystem instance parameters
+("superblock flags" in kernel-developer parlance)
+apply to all mount objects
+derived from the same filesystem instance.
+.P
+When using
+.BR mount (2),
+the line between these two types of mount options was blurred.
+However, with
+.BR mount_setattr ()
+and
+.BR fsconfig (2),
+the distinction is made much clearer.
+Mount attributes are configured with
+.BR mount_setattr (),
+while filesystem parameters can be configured using
+.BR fsconfig (2).
+.\"
.SS Extensibility
In order to allow for future extensibility,
.BR mount_setattr ()
--
2.51.0
next prev parent reply other threads:[~2025-09-19 2:01 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 1:59 [PATCH v4 00/10] man2: document "new" mount API Aleksa Sarai
2025-09-19 1:59 ` [PATCH v4 01/10] man/man2/mount_setattr.2: move mount_attr struct to mount_attr(2type) Aleksa Sarai
2025-09-19 16:04 ` Alejandro Colomar
2025-09-19 1:59 ` [PATCH v4 02/10] man/man2/fsopen.2: document "new" mount API Aleksa Sarai
2025-09-19 16:24 ` Alejandro Colomar
2025-09-19 21:19 ` Aleksa Sarai
2025-09-21 1:33 ` Aleksa Sarai
2025-09-21 8:39 ` Alejandro Colomar
2025-09-19 1:59 ` [PATCH v4 03/10] man/man2/fspick.2: " Aleksa Sarai
2025-09-21 8:53 ` Alejandro Colomar
2025-09-21 14:55 ` Aleksa Sarai
2025-09-21 15:17 ` Alejandro Colomar
2025-09-22 0:25 ` Askar Safin
2025-09-19 1:59 ` [PATCH v4 04/10] man/man2/fsconfig.2: " Aleksa Sarai
2025-09-21 9:26 ` Alejandro Colomar
2025-09-24 6:41 ` Aleksa Sarai
2025-09-24 8:52 ` Alejandro Colomar
2025-09-19 1:59 ` [PATCH v4 05/10] man/man2/fsmount.2: " Aleksa Sarai
2025-09-21 23:08 ` Askar Safin
2025-09-22 1:10 ` Askar Safin
2025-09-19 1:59 ` [PATCH v4 06/10] man/man2/move_mount.2: " Aleksa Sarai
2025-09-19 1:59 ` [PATCH v4 07/10] man/man2/open_tree.2: " Aleksa Sarai
2025-09-21 9:47 ` Alejandro Colomar
2025-09-22 10:09 ` Aleksa Sarai
2025-09-22 13:22 ` Alejandro Colomar
2025-09-24 1:34 ` Aleksa Sarai
2025-09-30 12:32 ` G. Branden Robinson
2025-10-02 22:20 ` Alejandro Colomar
2025-09-19 1:59 ` [PATCH v4 08/10] man/man2/mount_setattr.2: mirror opening sentence from fsopen(2) Aleksa Sarai
2025-09-21 9:50 ` Alejandro Colomar
2025-09-21 10:03 ` Aleksa Sarai
2025-09-21 10:19 ` Alejandro Colomar
2025-09-19 1:59 ` [PATCH v4 09/10] man/man2/open_tree{,_attr}.2: document new open_tree_attr() API Aleksa Sarai
2025-09-21 9:55 ` Alejandro Colomar
2025-09-24 6:31 ` Aleksa Sarai
2025-09-24 8:51 ` Alejandro Colomar
2025-09-19 1:59 ` Aleksa Sarai [this message]
2025-09-19 12:23 ` [PATCH v4 10/10] man/man2/{fsconfig,mount_setattr}.2: add note about attribute-parameter distinction Aleksa Sarai
2025-09-21 9:59 ` Alejandro Colomar
2025-09-22 1:06 ` Askar Safin
2025-09-21 2:43 ` [PATCH v4 00/10] man2: document "new" mount API Askar Safin
2025-09-21 9:58 ` Aleksa Sarai
2025-09-24 11:11 ` Aleksa Sarai
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=20250919-new-mount-api-v4-10-1261201ab562@cyphar.com \
--to=cyphar@cyphar.com \
--cc=alx@kernel.org \
--cc=brauner@kernel.org \
--cc=dhowells@redhat.com \
--cc=g.branden.robinson@gmail.com \
--cc=jack@suse.cz \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=safinaskar@zohomail.com \
--cc=viro@zeniv.linux.org.uk \
/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