Re: Re: [PATCH v6 1/3] fuse: add compound command to combine multiple requests
From: Horst Birthelmer
Date: Fri Mar 06 2026 - 09:31:13 EST
On Fri, Feb 27, 2026 at 10:45:36AM +0100, Miklos Szeredi wrote:
> On Thu, 26 Feb 2026 at 17:43, Horst Birthelmer <horst@xxxxxxxxxxxxxx> wrote:
>
> > +
> > +fallback_separate:
> > + /* Kernel tries to fallback to separate requests */
> > + if (!(compound->compound_header.flags & FUSE_COMPOUND_ATOMIC))
> > + ret = fuse_compound_fallback_separate(compound);
> > +
> > +out:
> > + kfree(resp_payload_buffer);
> > +out_free_buffer:
> > + kfree(buffer);
> > + return ret;
> > +}
>
> If we go with the list of fuse_args, then all the above logic could go
> into the lower layer (dev.c) which already handles fuse_args ->
> request -> fuse_args conversion. What's needed is mostly just a loop
> that repeats this for all the sub requests.
>
>
I have actually implemented this idea and avoided any memory allocation.
So the short version is, it can be done.
But to me this looks kinda ugly and a bit wrong. I have to check in the
lower layer for an opcode from the upper layer and 'stream' the args.
(in fuse_dev_do_read() or somewhere in that region there has to be
a check for FUSE_COMPOUND and then call into different code)
When handled on that level it has to be handled for io-uring
slightly differently as well.
I will test this a bit more and provide a new version unless someone
tells me that this is not the right direction.
>
> Thanks,
> Miklos
Thanks,
Horst