From: Alejandro Colomar <alx@kernel.org>
To: Bhavik Sachdev <b.sachdev1904@gmail.com>
Cc: linux-man@vger.kernel.org, criu@lists.linux.dev,
Andrei Vagin <avagin@gmail.com>,
Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
Jeff Layton <jlayton@kernel.org>,
Miklos Szeredi <miklos@szeredi.hu>,
Josef Bacik <josef@toxicpanda.com>,
Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH 1/9] man/man2/statmount.2: Document req.mnt_ns_id and STATMOUNT_MNT_NS_ID
Date: Thu, 29 Jan 2026 16:23:16 +0100 [thread overview]
Message-ID: <aXt7AoaCFkWEvktW@devuan> (raw)
In-Reply-To: <b312000a204c408f452757793c12e65be510cb96.1769608658.git.b.sachdev1904@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3778 bytes --]
Hi Bhavik,
On 2026-01-28T19:27:30+0530, Bhavik Sachdev wrote:
> Document the new mnt_ns_id parameter to struct mnt_id_req and the
> STATMOUNT_MNT_NS_ID flag.
>
> req.mnt_ns_id can be used to query for a mount in a foreign mount
> namespace.
>
> STATMOUNT_MNT_NS_ID can be used to retreive the mnt_ns_id of the mount
> being queried.
>
> The mnt_ns_id parameter description is based on this commit message [1]
> and STATMOUNT_MNT_NS_ID text is based on [2].
>
> Link [1]:
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71aacb4c8c3d19da053363a5fe7538a8af082d56>
> Link [2]:
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=09b31295f833031c88419550172703d45c5401e3>
>
> Signed-off-by: Bhavik Sachdev <b.sachdev1904@gmail.com>
> ---
> man/man2/statmount.2 | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/man/man2/statmount.2 b/man/man2/statmount.2
> index cdc96da92..8cf6775ff 100644
> --- a/man/man2/statmount.2
> +++ b/man/man2/statmount.2
> @@ -23,9 +23,10 @@ .SH SYNOPSIS
> .P
> .EX
> .B struct mnt_id_req {
> -.BR " __u32 size;" " /* sizeof(struct mnt_id_req) */"
> -.BR " __u64 mnt_id;" " /* The mnt_id being queried */"
> -.BR " __u64 param;" " /* An ORed combination of the STATMOUNT_ constants */"
> +.BR " __u32 size;" " /* sizeof(struct mnt_id_req) */"
> +.BR " __u64 mnt_id;" " /* The mnt_id being queried */"
> +.BR " __u64 param;" " /* An ORed combination of the STATMOUNT_ constants */"
> +.BR " __u32 mnt_ns_id;" " /* The id of mnt_ns to query the mnt_id in */"
> .B };
> .P
> .B struct statmount {
> @@ -47,6 +48,7 @@ .SH SYNOPSIS
> .B " __u64 propagate_from;"
> .B " __u32 mnt_root;"
> .B " __u32 mnt_point;"
> +.B " __u64 mnt_ns_id;"
> .B " char str[];"
> .B };
> .EE
> @@ -59,6 +61,9 @@ .SH SYNOPSIS
> .SH DESCRIPTION
> To access a mount's status,
> the caller must have CAP_SYS_ADMIN in the user namespace.
> +In case of accessing a mount in a foreign mount namespace (specified via
> +.IR req.mnt_ns_id ),
> +the foreign mount namespace should be child of the current namespace.
> .P
> This function returns information about a mount,
> storing it in the buffer pointed to by
> @@ -102,6 +107,7 @@ .SS The mnt_id_req structure
> STATMOUNT_MNT_ROOT /* Want/got mnt_root */
> STATMOUNT_MNT_POINT /* Want/got mnt_point */
> STATMOUNT_FS_TYPE /* Want/got fs_type */
> +STATMOUNT_MNT_NS_ID /* Want/got mnt_ns_id */
> .TE
> .in
> .P
> @@ -130,6 +136,14 @@ .SS The mnt_id_req structure
> as one or more bits may,
> in the future,
> be used to specify an extension to the buffer.
> +.P
> +.I req.mnt_ns_id
> +can be obtained from
> +.B NS_GET_MNTNS_ID
> +.BR ioctl (2)
> +operation and is used to specify a foreign mount namespace in which to query
> +.IR req.mnt_id .
> +.P
This .P is superfluous and produces a diagnostic.
> .SS The returned information
> The status information for the target mount is returned in the
> .I statmount
> @@ -232,6 +246,10 @@ .SS The returned information
> relative to the current root (ie if you are in a
> .BR chroot ).
> It is a null-terminated string.
> +.TP
> +.I smbuf.mnt_ns_id
> +The unique ID of the mount namespace the mount belongs to.
> +.TP
This .TP is superfluous and produces a diagnostic.
.P, .IP, and .TP introduce a new paragraph. It doesn't make sense to
have them before a section heading.
Have a lovely day!
Alex
> .SH RETURN VALUE
> On success, zero is returned.
> On error, \-1 is returned, and
> --
> 2.52.0
>
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-01-29 15:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 13:57 [RFC PATCH 0/9] man/man2/statmount.2: Document New Features Bhavik Sachdev
2026-01-28 13:57 ` [PATCH 1/9] man/man2/statmount.2: Document req.mnt_ns_id and STATMOUNT_MNT_NS_ID Bhavik Sachdev
2026-01-29 15:23 ` Alejandro Colomar [this message]
2026-01-28 13:57 ` [PATCH 2/9] man/man2/statmount.2: Document STATMOUNT_MNT_OPTS Bhavik Sachdev
2026-01-28 13:57 ` [PATCH 3/9] man/man2/statmount.2: Document STATMOUNT_FS_SUBTYPE Bhavik Sachdev
2026-01-28 13:57 ` [PATCH 4/9] man/man2/statmount.2: Document STATMOUNT_SB_SOURCE Bhavik Sachdev
2026-01-28 13:57 ` [PATCH 5/9] man/man2/statmount.2: Document STATMOUNT_OPT_ARRAY Bhavik Sachdev
2026-01-28 13:57 ` [PATCH 6/9] man/man2/statmount.2: Document STATMOUNT_OPT_SEC_ARRAY Bhavik Sachdev
2026-01-28 13:57 ` [PATCH 7/9] man/man2/statmount.2: Document STATMOUNT_{UIDMAP,GIDMAP} Bhavik Sachdev
2026-01-28 13:57 ` [PATCH 8/9] man/man2/statmount.2: Document STATMOUNT_SUPPORTED_MASK Bhavik Sachdev
2026-01-28 13:57 ` [PATCH 9/9] man/man2/statmount.2: Document STATMOUNT_BY_FD Bhavik Sachdev
2026-01-28 19:38 ` Andrei Vagin
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=aXt7AoaCFkWEvktW@devuan \
--to=alx@kernel.org \
--cc=avagin@gmail.com \
--cc=b.sachdev1904@gmail.com \
--cc=brauner@kernel.org \
--cc=criu@lists.linux.dev \
--cc=jlayton@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-man@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=ptikhomirov@virtuozzo.com \
/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