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

From: Bhavik Sachdev

Date: Wed Nov 12 2025 - 13:29:57 EST


On Wed Nov 12, 2025 at 11:30 PM IST, Andrei Vagin wrote:
> On Sat, Nov 8, 2025 at 9:40 PM Bhavik Sachdev <b.sachdev1904@xxxxxxxxx> 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