[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJnrk1anWXks-JRmEGaYUYuxNqFjBoXsyuT5w2fwbMRcSa5w7w@mail.gmail.com>
Date: Thu, 8 Jan 2026 14:12:45 -0800
From: Joanne Koong <joannelkoong@...il.com>
To: Bernd Schubert <bernd@...ernd.com>
Cc: horst@...thelmer.com, Miklos Szeredi <miklos@...redi.hu>,
Bernd Schubert <bschubert@....com>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, Horst Birthelmer <hbirthelmer@....com>,
syzbot@...kaller.appspotmail.com
Subject: Re: [PATCH RFC v3 1/3] fuse: add compound command to combine multiple requests
On Thu, Jan 8, 2026 at 2:01 PM Bernd Schubert <bernd@...ernd.com> wrote:
>
> On 1/8/26 15:23, horst@...thelmer.com wrote:
> > From: Horst Birthelmer <hbirthelmer@....com>
> >
> > For a FUSE_COMPOUND we add a header that contains information
> > about how many commands there are in the compound and about the
> > size of the expected result. This will make the interpretation
> > in libfuse easier, since we can preallocate the whole result.
> > Then we append the requests that belong to this compound.
> >
> > The API for the compound command has:
> > fuse_compound_alloc()
> > fuse_compound_add()
> > fuse_compound_send()
> > fuse_compound_free()
> >
> > Signed-off-by: Horst Birthelmer <hbirthelmer@....com>
> > Tested-by: syzbot@...kaller.appspotmail.com
> > ---
> > fs/fuse/Makefile | 2 +-
> > fs/fuse/compound.c | 276 ++++++++++++++++++++++++++++++++++++++++++++++
> > fs/fuse/fuse_i.h | 12 ++
> > include/uapi/linux/fuse.h | 37 +++++++
> > 4 files changed, 326 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/fuse/Makefile b/fs/fuse/Makefile
> > index 22ad9538dfc4..4c09038ef995 100644
> > --- a/fs/fuse/Makefile
> > +++ b/fs/fuse/Makefile
> > @@ -11,7 +11,7 @@ obj-$(CONFIG_CUSE) += cuse.o
> > 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 += dev.o dir.o file.o inode.o control.o xattr.o acl.o readdir.o ioctl.o compound.o
> > fuse-y += iomode.o
> > fuse-$(CONFIG_FUSE_DAX) += dax.o
> > fuse-$(CONFIG_FUSE_PASSTHROUGH) += passthrough.o backing.o
> > diff --git a/fs/fuse/compound.c b/fs/fuse/compound.c
> > new file mode 100644
> > index 000000000000..2f292ae3e816
> > --- /dev/null
> > +++ b/fs/fuse/compound.c
> > @@ -0,0 +1,276 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * FUSE: Filesystem in Userspace
> > + * Copyright (C) 2025
> > + *
> > + * This file implements compound operations for FUSE, allowing multiple
> > + * operations to be batched into a single request to reduce round trips
> > + * between kernel and userspace.
> > + */
> > +
> > +#include "fuse_i.h"
> > +
> > +/*
> > + * Compound request builder and state tracker and args pointer storage
> > + */
> > +struct fuse_compound_req {
> > + struct fuse_mount *fm;
> > + struct fuse_compound_in compound_header;
> > + struct fuse_compound_out result_header;
> > +
> > + /* Per-operation error codes */
> > + int op_errors[FUSE_MAX_COMPOUND_OPS];
> > + /* Original fuse_args for response parsing */
> > + struct fuse_args *op_args[FUSE_MAX_COMPOUND_OPS];
> > +
> > + bool parsed; /* Prevent double-parsing of response */
>
> Just for Joanne and other reviewers, Horst is preparing the next
> version, this 'parsed' is also going to be removed.
Sounds great, thanks for the update. I'll wait for the next version
before reviewing.
Thanks,
Joanne
>
> > +};
Powered by blists - more mailing lists