linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v5 8/8] man/man2/{fsconfig,mount_setattr}.2: add note about attribute-parameter distinction
Date: Thu, 25 Sep 2025 01:31:30 +1000	[thread overview]
Message-ID: <20250925-new-mount-api-v5-8-028fb88023f2@cyphar.com> (raw)
In-Reply-To: <20250925-new-mount-api-v5-0-028fb88023f2@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 | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/man/man2/fsconfig.2 b/man/man2/fsconfig.2
index a2d844a105c74f17af640d6991046dbd5fa69cf0..3b972761196b9c1577a6f324a2f4135471dd0ab3 100644
--- a/man/man2/fsconfig.2
+++ b/man/man2/fsconfig.2
@@ -580,6 +580,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 2f8a79dfde722b7b58b80797d89798076af94f55..efe22496be95383b986d9a3623324d472a76c189 100644
--- a/man/man2/mount_setattr.2
+++ b/man/man2/mount_setattr.2
@@ -792,6 +792,45 @@ .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 filesystem parameter
+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 are configured using
+.BR fsconfig (2).
 .SS Extensibility
 In order to allow for future extensibility,
 .BR mount_setattr ()

-- 
2.51.0


  parent reply	other threads:[~2025-09-24 15:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24 15:31 [PATCH v5 0/8] man2: document "new" mount API Aleksa Sarai
2025-09-24 15:31 ` [PATCH v5 1/8] man/man2/fsopen.2: " Aleksa Sarai
2025-09-25 10:13   ` Alejandro Colomar
2025-09-24 15:31 ` [PATCH v5 2/8] man/man2/fspick.2: " Aleksa Sarai
2025-09-25 11:14   ` Alejandro Colomar
2025-09-24 15:31 ` [PATCH v5 3/8] man/man2/fsconfig.2: " Aleksa Sarai
2025-09-25 11:32   ` Alejandro Colomar
2025-09-25 15:15     ` Aleksa Sarai
2025-09-25 16:52       ` Alejandro Colomar
2025-09-26 12:48   ` Alejandro Colomar
2025-09-24 15:31 ` [PATCH v5 4/8] man/man2/fsmount.2: " Aleksa Sarai
2025-09-26 12:51   ` Alejandro Colomar
2025-09-24 15:31 ` [PATCH v5 5/8] man/man2/move_mount.2: " Aleksa Sarai
2025-09-26 12:56   ` Alejandro Colomar
2025-09-24 15:31 ` [PATCH v5 6/8] man/man2/open_tree.2: " Aleksa Sarai
2025-10-01 17:59   ` Alejandro Colomar
2025-09-24 15:31 ` [PATCH v5 7/8] man/man2/open_tree{,_attr}.2: document new open_tree_attr() API Aleksa Sarai
2025-10-01  0:38   ` Askar Safin
2025-10-01  6:45     ` Alejandro Colomar
2025-10-01  7:37       ` Aleksa Sarai
2025-10-01  7:35     ` Aleksa Sarai
2025-10-01 18:02       ` Alejandro Colomar
2025-10-03  4:22         ` Aleksa Sarai
2025-09-24 15:31 ` Aleksa Sarai [this message]
2025-10-01 18:20 ` [PATCH v5 0/8] man2: document "new" mount API Alejandro Colomar
2025-10-26 12:27   ` Askar Safin
2025-10-26 17:27     ` Alejandro Colomar

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=20250925-new-mount-api-v5-8-028fb88023f2@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;
as well as URLs for NNTP newsgroup(s).