Re: [RFC PATCH v2 3/6] fuse: initial infrastructure for FUSE_LOOKUP_HANDLE support
From: Luis Henriques
Date: Tue Dec 16 2025 - 07:03:34 EST
On Tue, Dec 16 2025, Miklos Szeredi wrote:
> On Tue, 16 Dec 2025 at 12:33, Luis Henriques <luis@xxxxxxxxxx> wrote:
>>
>> On Tue, Dec 16 2025, Miklos Szeredi wrote:
>>
>> > On Fri, 12 Dec 2025 at 19:12, Luis Henriques <luis@xxxxxxxxxx> wrote:
>> >>
>> >> This patch adds the initial infrastructure to implement the LOOKUP_HANDLE
>> >> operation. It simply defines the new operation and the extra fuse_init_out
>> >> field to set the maximum handle size.
>> >
>> > Since we are introducing a new op, I'd consider switching to
>> > fuse_statx for the attributes.
>>
>> So, just to clarify: you're suggesting that the maximum handle size should
>> instead be set using statx. Which means that the first time the client
>> (kernel) needs to use this value it would emit a FUSE_STATX, and cache
>> that value for future use. IIUC, this would also require a new mask
>> (STATX_MAX_HANDLE_SZ) to be added. Did I got it right?
>
> No, using statx as the output of LOOKUP_HANDLE is independent from the
> other suggestion.
>
>> What would be the advantages of using statx? Keeping the unused bytes in
>> struct fuse_init_out untouched?
>
> Using fuse_statx instead of fuse_attr would allow btime (and other
> attributes added to statx in the future) to be initialized on lookup.
Oh! Of course, I totally misunderstood your suggestion. Right, creating a
new *_out struct probably makes sense. Something like a mix between
fuse_entry_out and fuse_statx_out.
Cheers,
--
Luís