Re: [PATCH v2] fuse: Send FORGET over io_uring when ring is ready

From: Joanne Koong

Date: Fri Apr 03 2026 - 15:01:14 EST


On Thu, Apr 2, 2026 at 8:58 PM Li Wang <liwang@xxxxxxxxxx> wrote:
>

Hi Li,

Thanks for your work on this.

> Once the FUSE io_uring is registered and marked ready, most request
> types are delivered through io_uring, while FORGET notifications were still
> queued with fuse_dev_queue_forget() and only consumed through the legacy
> path on /dev/fuse.
>
> Deliver single FORGET operations through fuse_uring_queue_fuse_req() when
> the ring is ready. Otherwise, fall back to the legacy forget list path so
> behavior matches the previous implementation.

I don't think routing forgets through fuse_uring_queue_fuse_req()
alone is sufficient. Forgets are one-way and the server does not reply
to them, which is a problem for fuse over io-uring because the server
must submit a completion sqe to reuse the ring entry for future
requests. To support forget requests, I think you will also have to
add

a) on the libfuse side, submit completion sqes for forget requests
b) on the kernel side, keep forget requests on the processing queue
instead of ending them immediately so that when the kernel gets the
completion sqe for the forget request, it can find the corresponding
entry for it and recycle the entry back to the available queue so it
can be used for future requests
c) gate this behind a feature or config flag to resolve any
incompatibilities between older versions of libfuse and newer versions
of the kernel

For c) I think it's cleaner to pass this as a flag during registration
time, but it'd be imo preferable if there was just one generic flag
for requests that had no-op reply expectations, so I think it'd be
ideal if the code for sending interrupts over io-uring was also
included in this series so they could land together and be gated on
the same flag.

Forgets are also prioritized over regular pending requests for
dispatching to the server, so this priority should ideally be
preserved in the fuse io-uring path as well.

Thanks,
Joanne