Re: [PATCH v2] fuse: Fix the condition to enable over-io-uring

Baokun Li <[email protected]>
Newsgroups dev.linux.lists.fuse-devel
Message-ID <[email protected]>
Hi Bernd,

On 2026/8/22 00:19, Bernd Schubert via B4 Relay wrote:
> + /* Once a connection has io-uring enabled on it, it can't be disabled */
> + if (!enable_uring && !fch->io_uring) {
> + pr_info_ratelimited("fuse-io-uring is disabled by module parameter\n");
> + return -EOPNOTSUPP;
> + }
> +
> + if (!fch->io_uring) {
> + pr_info_ratelimited(
> + "fuse-io-uring not enabled on this connection\n");
> + return -EOPNOTSUPP;
> + }

This combined with the REGISTER error path can hang IO when the ring is
already operational.  E.g. 100 entries, the 100th REGISTER fails after
ring->ready is set:

  new request:                        server fetch:
  fuse_send_one()                     IORING_OP_URING_CMD
    fiq->ops->send_req()                fuse_uring_cmd()
      fuse_uring_queue_fuse_req()         if (!fch->io_uring)  // == 0
        -> queued, no consumer              return -EOPNOTSUPP

The error path clears fch->io_uring but never reverts fiq->ops, so
requests keep flowing into io_uring queues while COMMIT_AND_FETCH is
rejected for all 99 active entries.

Maybe only tear down if the ring never became ready:

      if (err) {
          if (!fuse_uring_ready(fch)) {
              fch->io_uring = 0;
              wake_up_all(&fch->blocked_waitq);
              pr_info("[%u] fuse-io-uring disabled on connection err=%d\n",
                      fch->conn->dev, err);
          }
          return err;
      }


Regards,
Baokun
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.