[PATCH v2 05/10] man/man2/statmount.2: Document STATMOUNT_OPT_ARRAY

Bhavik Sachdev <[email protected]> Sun, 22 Feb 2026 20:15:55 +0530
Newsgroups dev.linux.lists.criu,org.kernel.vger.linux-man
Message-ID <4e925a9f871ec408d82db0124300d97200c4a778.1771771560.git.b.sachdev1904@gmail.com>
Document STATMOUNT_OPT_ARRAY flag and the corresponding fields
introduced by it. This text is based on this commit message [1].

Retrieve only file system options, separated by null bytes. For security
opts STATMOUNT_OPT_SEC_ARRAY is used.

Link [1]:
<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f4d4503e9e5ab765a7948f98bc5deef7850f607>

Signed-off-by: Bhavik Sachdev <[email protected]>
---
 man/man2/statmount.2 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/man/man2/statmount.2 b/man/man2/statmount.2
index f7a2feff9..c238a3d9f 100644
--- a/man/man2/statmount.2
+++ b/man/man2/statmount.2
@@ -52,6 +52,8 @@ .SH SYNOPSIS
 .B "    __u64  mnt_ns_id;"
 .B "    __u32  fs_subtype;"
 .B "    __u32  sb_source;"
+.B "    __u32  opt_num;"
+.B "    __u32  opt_array;"
 .B "    char   str[];"
 .B };
 .EE
@@ -114,6 +116,7 @@ .SS The mnt_id_req structure
 STATMOUNT_MNT_OPTS	/* Want/got mnt_opts */
 STATMOUNT_FS_SUBTYPE	/* Want/got fs_subtype */
 STATMOUNT_SB_SOURCE	/* Want/got sb_source */
+STATMOUNT_OPT_ARRAY	/* Want/got opt_... */
 .TE
 .in
 .P
@@ -276,6 +279,16 @@ .SS The returned information
 .I smbuf.str
 that contains the source of the mount.
 It is a null-terminated string.
+.TP
+.IR smbuf.opt_num " (since Linux 6.13)"
+The number of filesystem options set on the mount.
+.TP
+.IR smbuf.opt_array " (since Linux 6.13)"
+The offset to the location in the
+.I smbuf.str
+buffer that contains file system options separated by null bytes.
+They can be iterated over with the help of
+.IR smbuf.opt_num .
 .SH RETURN VALUE
 On success, zero is returned.
 On error, \-1 is returned, and
-- 
2.53.0