Re: [PATCH] fuse: skip lookup during atomic_open() when O_CREAT is set
From: Luis Henriques
Date: Mon Feb 23 2026 - 11:43:40 EST
On Mon, Feb 23 2026, 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?
FWIW, what I've been doing is something slightly different. I have been
working on implementing MKOBJ_HANDLE+STATX+OPEN. And the plan was to rely
on the compound flags, leaving it to user-space to handle the atomicity
(e.g. MKOBJ_HANDLE would fail if O_EXCL was set).
I was hoping to share a draft of this very soon, though it's still
incomplete. For example, not all required compound operations are already
implemented, most notably readdirplus!
Cheers,
--
Luís