Re: [RFC PATCH v3 6/8] fuse: implementation of lookup_handle+statx compound operation

Luis Henriques
2026-02-26T15:07:17Z

On Thu, Feb 26 2026, Miklos Szeredi wrote:

> On Thu, 26 Feb 2026 at 11:08, Amir Goldstein <amir73il@gmail.com> wrote:
>
>> file handle on stack only makes sense for small pre allocated size.
>> If the server has full control over handle size, then that is not relevant.
>
> I thought the point was that the file handle is available in
> fi->handle and doesn't need to be allocated/copied. Instead
> extensions could be done with an argument vector, like this:

Right now the code is using extensions in the lookup_handle operation
inargs, and only if a file handle is available for the parent inode.

Are you saying that outargs should also use extensions for getting the
file handle in a lookup_handle?

Cheers,
--
Luís

> --- a/fs/fuse/fuse_i.h
> +++ b/fs/fuse/fuse_i.h
> @@ -326,6 +326,12 @@ struct fuse_folio_desc {
> unsigned int offset;
> };
>
> +struct fuse_ext_arg {
> + u32 type;
> + u32 size;
> + const void *value;
> +};
> +
> struct fuse_args {
> uint64_t nodeid;
> uint32_t opcode;
> @@ -346,6 +352,7 @@ struct fuse_args {
> bool is_pinned:1;
> bool invalidate_vmap:1;
> struct fuse_in_arg in_args[4];
> + struct fuse_ext_arg ext_args[2];
> struct fuse_arg out_args[2];
> void (*end)(struct fuse_mount *fm, struct fuse_args *args, int error);
> /* Used for kvec iter backed by vmalloc address */
>
> Thanks,
> Miklos