Re: [PATCH v5] statmount: accept fd as a parameter

"Bhavik Sachdev" <[email protected]> Wed, 12 Nov 2025 23:59:48 +0530
Newsgroups dev.linux.lists.criu,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Wed Nov 12, 2025 at 11:30 PM IST, Andrei Vagin wrote:
> On Sat, Nov 8, 2025 at 9:40 PM Bhavik Sachdev <[email protected]> wrote:
>>
>> Extend `struct mnt_id_req` to take in a fd and introduce STATMOUNT_BY_FD
>> flag. When a valid fd is provided and STATMOUNT_BY_FD is set, statmount
>> will return mountinfo about the mount the fd is on.
>
> It would be great to add self-tests for this new feature in
> `tools/testing/selftests/filesystems/statmount/`. These tests would
> serve two purposes:
> demonstrate the functionality of the new feature and ensure its
> continued stability
> against future changes.
>

We are currently working on adding selftests!

You can see the progress on this branch on github [1] and this commit
[2]. We will try to send a patch as soon as possible.

[1]: https://github.com/bsach64/linux/tree/statmount-fd-tests
[2]: https://github.com/bsach64/linux/commit/9ad91e5e2f01d5c7a8ac24b6e13c7942457a5270

Kind Regards,
Bhavik