[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aWkEWEgerlDv0bt6@fedora>
Date: Thu, 15 Jan 2026 16:25:32 +0100
From: Horst Birthelmer <horst@...thelmer.de>
To: Luis Henriques <luis@...lia.com>
Cc: Bernd Schubert <bernd@...ernd.com>,
Joanne Koong <joannelkoong@...il.com>, Horst Birthelmer <horst@...thelmer.com>,
Miklos Szeredi <miklos@...redi.hu>, linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Horst Birthelmer <hbirthelmer@....com>
Subject: Re: Re: [PATCH v4 3/3] fuse: add an implementation of open+getattr
Hi Luis,
thanks for looking at this.
On Thu, Jan 15, 2026 at 03:11:25PM +0000, Luis Henriques wrote:
> On Thu, Jan 15 2026, Horst Birthelmer wrote:
>
> > On Thu, Jan 15, 2026 at 02:41:49PM +0100, Bernd Schubert wrote:
> >>
> >>
> >> On 1/15/26 14:38, Horst Birthelmer wrote:
> >> > On Wed, Jan 14, 2026 at 06:29:26PM -0800, Joanne Koong wrote:
> >> >> On Fri, Jan 9, 2026 at 10:27 AM Horst Birthelmer <horst@...thelmer.com> wrote:
> >> >>>
> >> >>> +
> >> >>> + err = fuse_compound_send(compound);
> >> >>> + if (err)
> >> >>> + goto out;
> >> >>> +
> >> >>> + err = fuse_compound_get_error(compound, 0);
> >> >>> + if (err)
> >> >>> + goto out;
> >> >>> +
> >> >>> + err = fuse_compound_get_error(compound, 1);
> >> >>> + if (err)
> >> >>> + goto out;
> >> >>
> >> >> Hmm, if the open succeeds but the getattr fails, why not process it
> >> >> kernel-side as a success for the open? Especially since on the server
> >> >> side, libfuse will disassemble the compound request into separate
> >> >> ones, so the server has no idea the open is even part of a compound.
> >> >>
> >> >> I haven't looked at the rest of the patch yet but this caught my
> >> >> attention when i was looking at how fuse_compound_get_error() gets
> >> >> used.
> >> >>
> >> > After looking at this again ...
> >> > Do you think it would make sense to add an example of lookup+create, or would that just convolute things?
> >>
> >>
> >> I think that will be needed with the LOOKUP_HANDLE from Luis, if we go
> >> the way Miklos proposes. To keep things simple, maybe not right now?
> >
> > I was thinking more along the lines of ... we would have more than one example
> > especially for the error handling. Otherwise it is easy to miss something
> > because the given example just doesn't need that special case.
> > Like the case above. There we would be perfectly fine with a function returning
> > the first error, which in the case of lookup+create is the opposite of success
> > and you would need to access every single error to check what actually happened.
>
> Not sure if I can add a lot to this discussion, but I've been playing a
> bit with your patchset.
You already do ;-)
>
> I was trying to understand how to implement the LOOKUP_HANDLE+STATX, and
> it doesn't look too difficult at the moment. But I guess it'll take me some
> more time to figure out all the other unknowns (e.g. other operations such
> as readdirplus).
>
> Anyway, the interface for compound operations seem to be quite usable in
> general. I'll try to do a proper review soon, but regarding the specific
> comment of error handling, I find the interface a bit clumsy. Have you
> thought about using something like an iterator? Or maybe some sort of
> macro such as foreach_compound_error()?
Not in those terms, no.
But I don't think it would get any better. Do you have an idea you would want implemented in this context?
>
> And regarding the error handling in general: it sounds like things can
> become really complex when some operations within a compound operation may
> succeed and others fail. Because these examples are using two operations
> only, but there's nothing preventing us from having 3 or more in the
> future, right? Wouldn't it be easier to have the compound operation
> itself fail or succeed, instead of each op? (Although that would probably
> simply move the complexity into user-space, that would be required to do
> more clean-up work when there are failures.)
I think we need all the granularity we can get since different combinations mean different things in different contexts.
Imagine you have a compound as the current example. That is pretty much all or nothing and there is almost no way that one of the operations doesn't succeed, and if it goes wrong you can still fall back to separate operations.
There are certainly cases where the compound itself is the operation because it really has to be atomic, or for arguments sake they have to be started concurrently ... or whatnot.
>
> Cheers,
> --
> Luís
Thanks,
Horst
Powered by blists - more mailing lists