Re: Re: [PATCH] fuse: skip lookup during atomic_open() when O_CREAT is set
From: Horst Birthelmer
Date: Mon Feb 23 2026 - 13:56:06 EST
On Mon, Feb 23, 2026 at 04:53:33PM +0100, Miklos Szeredi wrote:
> On Mon, 23 Feb 2026 at 16:37, Bernd Schubert <bernd@xxxxxxxxxxx> wrote:
>
> > After the discussion about LOOKUO_HANDLE my impression was actually that
> > we want to use compounds for the atomic open.
>
> I think we want to introduce an atomic operation that does a lookup +
> an optional mknod, lets call this LOOKUP_CREATE_FH, this would return
> a flag indicating whether the file was created or if it existed prior
> to the operation.
>
> Then, instead of the current CREATE operation there would be a
> compound with LOOKUP_CREATE_FH + OPEN.
>
> Does that make sense?
What is wrong with a compound doing LOOKUP + MKNOD + OPEN?
If the fuse server knows how to process that 'group' atomically
in one big step it will do the right thing,
if not, we will call those in series and sort out the data
in kernel afterwards.
If we preserve all flags and the real results we can do pretty
much exactly the same thing that is done at the moment with just
one call to user space.
That was actually what I was experimenting with.
The MKNOD in the middle is optional depending on the O_CREAT flag.
>
> Thanks,
> Miklos
Cheers,
Horst