Re: [RFC PATCH v2 5/6] fuse: factor out NFS export related code

From: Luis Henriques

Date: Mon Dec 15 2025 - 07:05:51 EST


On Sun, Dec 14 2025, Amir Goldstein wrote:

> On Fri, Dec 12, 2025 at 7:13 PM Luis Henriques <luis@xxxxxxxxxx> wrote:
>>
>> Move all the NFS-related code into a different file. This is just
>> preparatory work to be able to use the LOOKUP_HANDLE file handles as the NFS
>> handles.
>>
>> Signed-off-by: Luis Henriques <luis@xxxxxxxxxx>
>
> Very nice.
> Apart from minor nit below, feel free to add:

Thanks!

> Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>
>
>> ---
>> fs/fuse/Makefile | 2 +-
>> fs/fuse/dir.c | 1 +
>> fs/fuse/export.c | 174 +++++++++++++++++++++++++++++++++++++++++++++++
>> fs/fuse/fuse_i.h | 6 ++
>> fs/fuse/inode.c | 167 +--------------------------------------------
>> 5 files changed, 183 insertions(+), 167 deletions(-)
>> create mode 100644 fs/fuse/export.c
>>
>> diff --git a/fs/fuse/Makefile b/fs/fuse/Makefile
>> index 22ad9538dfc4..1d1401658278 100644
>> --- a/fs/fuse/Makefile
>> +++ b/fs/fuse/Makefile
>> @@ -12,7 +12,7 @@ obj-$(CONFIG_VIRTIO_FS) += virtiofs.o
>>
>> fuse-y := trace.o # put trace.o first so we see ftrace errors sooner
>> fuse-y += dev.o dir.o file.o inode.o control.o xattr.o acl.o readdir.o ioctl.o
>> -fuse-y += iomode.o
>> +fuse-y += iomode.o export.o
>> fuse-$(CONFIG_FUSE_DAX) += dax.o
>> fuse-$(CONFIG_FUSE_PASSTHROUGH) += passthrough.o backing.o
>> fuse-$(CONFIG_SYSCTL) += sysctl.o
>> diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
>> index a6edb444180f..a885f1dc61eb 100644
>> --- a/fs/fuse/dir.c
>> +++ b/fs/fuse/dir.c
>> @@ -190,6 +190,7 @@ static void fuse_lookup_init(struct fuse_conn *fc, struct fuse_args *args,
>>
>> args->opcode = FUSE_LOOKUP_HANDLE;
>> args->out_argvar = true;
>> + args->out_argvar_idx = 0;
>>
>
> This change looks out of place.

Oops! Indeed, not sure how that happen. This change belongs to patch

fuse: store index of the variable length argument

> Keep in mind that it may take me some time to get to the rest of the patches,
> but this one was a low hanging review.

Sure, no problem. I just wanted to send a new rev before everyone goes
off for EOY break. But I understand it'll probably take some time before
anyone has a look into it.

[ And maybe this -- FUSE restartability -- is even a topic for LSFMM. ]

Cheers,
--
Luís