All of lore.kernel.org
 help / color / mirror / Atom feed
From: Horst Birthelmer <horst@birthelmer.de>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Horst Birthelmer <horst@birthelmer.com>,
	 Miklos Szeredi <miklos@szeredi.hu>,
	Bernd Schubert <bschubert@ddn.com>,
	 Joanne Koong <joannelkoong@gmail.com>,
	Luis Henriques <luis@igalia.com>,
	linux-kernel@vger.kernel.org,  fuse-devel@lists.linux.dev,
	Horst Birthelmer <hbirthelmer@ddn.com>
Subject: Re: Re: [PATCH v7 1/4] fuse: add compound command to combine multiple requests
Date: Sat, 6 Jun 2026 19:30:55 +0200	[thread overview]
Message-ID: <aiRO6mUV7cK4HDNg@fedora.fritz.box> (raw)
In-Reply-To: <CAOQ4uxhGGUroMpTdLUEdKZd-=uefVoQW6Fm5_WX2-6S9T1TUmA@mail.gmail.com>

On Fri, Jun 05, 2026 at 09:41:00AM +0200, Amir Goldstein wrote:
> 
> TBH, I did not look at NFS/SMB compound protocols, not io_uring
> command chains, so I would appreciate it if you include a survey of the
> state of the art in other protocols practices for compound commands.

I think the NFS compounds and FUSE compounds have very little in common.
Except for the the name ;-)

NFS has a tiny stack machine in the compound engine you could write stuff like this:

SEQUENCE(sessionid, slotid, seqid, ...)
PUTFH(parent_fh)        # CFH = parent dir
SAVEFH                  # SFH = parent
OPEN(name, claim, ...)  # CFH = opened file, returns stateid
GETFH                   # return CFH so client learns the fh
GETATTR(bitmap)         # attrs of the opened file
RESTOREFH               # CFH = parent again
GETATTR(bitmap)         # attrs of parent (change attr for cache)

With the latest changes, I had to get a liitle bit in that direction, but I
would hesitate to even compare them. I don't think we need somthing like that
for FUSE, even though it could be useful, since they can be atomic or even
transactional AFAIK.

I don't think there could be conditions, though.

My first approach was to bunch the FUSE requests together and send them together
to userspace via fuse_simple_request(), nothing more. What made this more
complicated was the later requirement, that we have to do call the requests separately
if the fuse server does not support compounds or does not support this particular
compound.

In NFS if you get a minor version mismatch the server will fall back to a smaller
version. This is a little bit like what we do here.

Further, NFS has a map of supported operations. ATM I don't think we need that.
I would rather want to have a map of combinations we support, since my whole
motivation was, to be able to implement optimized combinations in the fuse server.

FUSE IMHO wasn't designed for this. 
It was designed to send the requests to the server and wait for an answer for every 
request, but with io-uring you actually could have a bunch of them in parallel.

---

IO-uring command chains I rejected, because I did not want to tie this to uring.
But with fusex, this is a whole new ball game.

AFAICT, the uring chains (or lately there were groups introduced) are just commands
that are linked together as a sequence. IOSQE_IO_LINK means that the next sqe should 
start after this one finishes successful. Our compounds are probably more related 
to uring groups, but there I don't know enough about, exept that groups can share 
resources, but I have no idea how that works.

My compounds were more of a semantic grouping, where the fuse server could provide
optimized implementation of the whole group request. At least that is how I use them
at the moment.

> 
> Thanks,
> Amir.

Thanks for challenging me to actually compare these. I haven't done this before since
it was something completely different in my mind ... and to some degree it still is.

Thanks,
Horst

  parent reply	other threads:[~2026-06-06 17:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  9:45 [PATCH v7 0/4] fuse: compound commands Horst Birthelmer
2026-06-04  9:45 ` [PATCH v7 1/4] fuse: add compound command to combine multiple requests Horst Birthelmer
2026-06-05  7:41   ` Amir Goldstein
2026-06-05  8:03     ` Horst Birthelmer
2026-06-06 17:30     ` Horst Birthelmer [this message]
2026-06-04  9:45 ` [PATCH v7 2/4] fuse: create helper functions for filling in fuse args for open and getattr Horst Birthelmer
2026-06-05  7:42   ` Amir Goldstein
2026-06-04  9:45 ` [PATCH v7 3/4] fuse: add an implementation of open+getattr Horst Birthelmer
2026-06-05  7:50   ` Amir Goldstein
2026-06-04  9:45 ` [PATCH v7 4/4] fuse: add compound command for dentry revalidation Horst Birthelmer
2026-06-05  8:06   ` Amir Goldstein
2026-06-05  8:09     ` Horst Birthelmer
2026-06-05  8:12 ` [PATCH v7 0/4] fuse: compound commands Amir Goldstein
2026-06-05  8:49   ` Horst Birthelmer
2026-06-05  9:15     ` Amir Goldstein
2026-06-05  9:28       ` Horst Birthelmer
2026-06-05 10:49     ` Bernd Schubert
2026-06-05 11:26       ` Horst Birthelmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiRO6mUV7cK4HDNg@fedora.fritz.box \
    --to=horst@birthelmer.de \
    --cc=amir73il@gmail.com \
    --cc=bschubert@ddn.com \
    --cc=fuse-devel@lists.linux.dev \
    --cc=hbirthelmer@ddn.com \
    --cc=horst@birthelmer.com \
    --cc=joannelkoong@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luis@igalia.com \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.