From: Alejandro Colomar <alx@kernel.org>
To: Askar Safin <safinaskar@gmail.com>
Cc: avagin@gmail.com, b.sachdev1904@gmail.com, brauner@kernel.org,
criu@lists.linux.dev, cyphar@cyphar.com, jlayton@kernel.org,
josef@toxicpanda.com, linux-man@vger.kernel.org,
miklos@szeredi.hu, ptikhomirov@virtuozzo.com
Subject: Re: [PATCH v3] man/man2/statmount.2: Document STATMOUNT_BY_FD
Date: Thu, 5 Mar 2026 01:42:57 +0100 [thread overview]
Message-ID: <aajREfJrV15V7HPe@devuan> (raw)
In-Reply-To: <20260305001337.3323169-1-safinaskar@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]
On 2026-03-05T03:13:37+0300, Askar Safin wrote:
> Alejandro Colomar <alx@kernel.org>:
> > Is this the same as a "mount object file descriptor" as describer in
> > fsopen(2)? If so, we should use the same language, I think.
>
> The term "mount object file descriptor" is probably confusing. In fact
> fsmount simply creates detached mount and returns O_PATH fd, referring
> to the root of the new detached mount. (Note: I'm talking about fsmount here,
> not fsopen.) This fd is similar to what open(O_PATH)
> creates. So probably we should just replace this "mount object file
> descriptor" in fsopen(2) with "O_PATH fd".
Except for expanding fd by file descriptor, what you say sounds
reasonable to me.
>
> The only difference between fd, returned by fsmount, and normal O_PATH
> descriptor is that fd, returned by fsmount, has FMODE_NEED_UNMOUNT flag
> on file description:
> https://elixir.bootlin.com/linux/v7.0-rc1/source/fs/namespace.c#L4495 .
>
> This FMODE_NEED_UNMOUNT means that when we close fd, the mount is unmounted.
>
>
> This statmount patch refers to any fd inside mount in question. I. e. any
> fd referring to any file inside the mount. This may include O_PATH descriptors
> and, yes, descriptors returned by fsmount. So, current wording in this
> statmount patch is correct.
Thanks for having a look! And thanks for confirming it's correct!
Have a lovely night!
Alex
>
> --
> Askar Safin
>
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-03-05 0:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-22 14:45 [PATCH v2 00/10] man/man2/statmount.2: Document New Features Bhavik Sachdev
2026-02-22 14:45 ` [PATCH v2 01/10] man/man2/statmount.2: Document req.mnt_ns_id and STATMOUNT_MNT_NS_ID Bhavik Sachdev
2026-02-22 14:45 ` [PATCH v2 02/10] man/man2/statmount.2: Document STATMOUNT_MNT_OPTS Bhavik Sachdev
2026-02-22 14:45 ` [PATCH v2 03/10] man/man2/statmount.2: Document STATMOUNT_FS_SUBTYPE Bhavik Sachdev
2026-02-22 14:45 ` [PATCH v2 04/10] man/man2/statmount.2: Document STATMOUNT_SB_SOURCE Bhavik Sachdev
2026-02-22 14:45 ` [PATCH v2 05/10] man/man2/statmount.2: Document STATMOUNT_OPT_ARRAY Bhavik Sachdev
2026-02-22 14:45 ` [PATCH v2 06/10] man/man2/statmount.2: Document STATMOUNT_OPT_SEC_ARRAY Bhavik Sachdev
2026-02-22 14:45 ` [PATCH v2 07/10] man/man2/statmount.2: Document STATMOUNT_{UIDMAP,GIDMAP} Bhavik Sachdev
2026-02-22 14:45 ` [PATCH v2 08/10] man/man2/statmount.2: Document STATMOUNT_SUPPORTED_MASK Bhavik Sachdev
2026-02-22 14:45 ` [PATCH v2 09/10] man/man2/statmount.2: Document req.mnt_ns_fd Bhavik Sachdev
2026-02-22 14:46 ` [PATCH v2 10/10] man/man2/statmount.2: Document STATMOUNT_BY_FD Bhavik Sachdev
2026-02-22 21:52 ` [PATCH v2 00/10] man/man2/statmount.2: Document New Features Alejandro Colomar
2026-02-23 14:10 ` [PATCH v2 1/4] man/man2/statmount.2: Document STATMOUNT_{UIDMAP,GIDMAP} Bhavik Sachdev
2026-02-23 15:41 ` Alejandro Colomar
2026-02-23 18:17 ` [PATCH v2] man/man2/statmount.2: Document STATMOUNT_BY_FD Bhavik Sachdev
2026-02-24 0:21 ` Alejandro Colomar
2026-02-26 3:10 ` [PATCH v3] " Bhavik Sachdev
2026-03-04 14:58 ` Alejandro Colomar
2026-03-05 0:13 ` Askar Safin
2026-03-05 0:42 ` Alejandro Colomar [this message]
2026-03-05 2:18 ` Aleksa Sarai
2026-03-05 17:19 ` Alejandro Colomar
2026-03-05 22:24 ` G. Branden Robinson
2026-03-05 22:45 ` Alejandro Colomar
2026-03-05 22:55 ` G. Branden Robinson
2026-03-06 7:51 ` Bhavik Sachdev
2026-02-23 14:10 ` [PATCH v2 2/4] man/man2/statmount.2: Document STATMOUNT_SUPPORTED_MASK Bhavik Sachdev
2026-02-23 14:10 ` [PATCH v2 3/4] man/man2/statmount.2: Document req.mnt_ns_fd Bhavik Sachdev
2026-02-23 14:10 ` [PATCH v2 4/4] man/man2/statmount.2: Document STATMOUNT_BY_FD Bhavik Sachdev
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=aajREfJrV15V7HPe@devuan \
--to=alx@kernel.org \
--cc=avagin@gmail.com \
--cc=b.sachdev1904@gmail.com \
--cc=brauner@kernel.org \
--cc=criu@lists.linux.dev \
--cc=cyphar@cyphar.com \
--cc=jlayton@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-man@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=ptikhomirov@virtuozzo.com \
--cc=safinaskar@gmail.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