Re: Re: [PATCH RFC v2 0/2] fuse: compound commands

From: Horst Birthelmer

Date: Tue Dec 30 2025 - 03:46:48 EST


On Mon, Dec 29, 2025 at 02:03:02PM +0800, Jingbo Xu wrote:
> Hi Horst & Bernd,
>
> On 12/24/25 6:13 AM, Horst Birthelmer wrote:
> > In the discussion about open+getattr here [1] Bernd and Miklos talked
> > about the need for a compound command in fuse that could send multiple
> > commands to a fuse server.
> >
> > Here's a propsal for exactly that compound command with an example
> > (the mentioned open+getattr).
> >
> > [1] https://lore.kernel.org/linux-fsdevel/CAJfpegshcrjXJ0USZ8RRdBy=e0MxmBTJSCE0xnxG8LXgXy-xuQ@xxxxxxxxxxxxxx/
> >
>
> To achieve close-to-open, why not just invalidate the cached attr on
> open so that the following access to the attr would trigger a new
> FUSE_GETATTR request to fetch the latest attr from server?
>

Hi Jingbo,

you are probably right, that it can be achieved that way. I thas some consequences that can be avoided, like having to wait at a later moment for the attributes to be fetched.

The main goal of this patch however was not close-to-open, even though it was discussed in that context.

We can do a lot more with the compounds than just fix close-to-open consistency. As Bernd mentioned, I am very close to havin implemented the fuse_atomic_open() call with compounds, namely the atomic combination of lookup+create.
And there are some more ideas out there.

open+getattr was just the low hanging fruit in this case.

Cheers,
Horst