Re: [PATCH 1/6] fhandle: create helper for name_to_handle_at(2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri Aug 15, 2025 at 4:21 AM MDT, Amir Goldstein wrote:
> On Fri, Aug 15, 2025 at 1:51 AM Thomas Bertschinger
> <tahbertschinger@xxxxxxxxx> wrote:
>> +/*
>> + * fs/fhandle.c
>> + */
>> +long do_name_to_handle_at(int dfd, const char __user *name,
>> +                         struct file_handle __user *handle,
>> +                         void __user *mnt_id, int flag, int lookup_flags);
>
> I really dislike do_XXX() helpers because we use them interchangeably
> sometimes to wrap vfs_XXX() helpers and sometimes the other way around,
> so exporting them in the vfs internal interface is a very bad pattern IMO.
>
> io_uring has a common pattern that requires a helper with all the syscall
> args and for that purpose, it uses do_renameat2(), do_unlinkat(), ...
>
> I would much rather that we stop this pattern and start with following
> the do_sys_XXX() pattern as in the do_sys_ftruncate() helper.
>
> Lucky for us, you just renamed the confusing helper named
> do_sys_name_to_handle(), so you are free to reuse this name
> (+ _at) in a non confusing placement.
>
> Thanks,
> Amir.

That makes sense, I can adjust it like that in v2. Thanks!





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux