All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baokun Li <libaokun@linux.alibaba.com>
To: bernd@bsbernd.com
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Joanne Koong <joannelkoong@gmail.com>,
	fuse-devel@lists.linux.dev, Thomas <thomas.fractalbits@gmail.com>,
	zhu <zzsheng@gmail.com>, Stefan Hajnoczi <stefanha@gmail.com>,
	stable@kernel.org
Subject: Re: [PATCH v2] fuse: Fix the condition to enable over-io-uring
Date: Mon, 24 Aug 2026 15:59:48 +0800	[thread overview]
Message-ID: <ba933500-eab4-4ee5-b276-2e155cd992ba@linux.alibaba.com> (raw)
In-Reply-To: <20260821-fuse-fix-enable-condition-v2-1-35a386d3d443@bsbernd.com>

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



      reply	other threads:[~2026-08-24  7:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 16:19 [PATCH v2] fuse: Fix the condition to enable over-io-uring Bernd Schubert via B4 Relay
2026-08-21 16:19 ` Bernd Schubert
2026-08-24  7:59 ` Baokun Li [this message]

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=ba933500-eab4-4ee5-b276-2e155cd992ba@linux.alibaba.com \
    --to=libaokun@linux.alibaba.com \
    --cc=bernd@bsbernd.com \
    --cc=fuse-devel@lists.linux.dev \
    --cc=joannelkoong@gmail.com \
    --cc=miklos@szeredi.hu \
    --cc=stable@kernel.org \
    --cc=stefanha@gmail.com \
    --cc=thomas.fractalbits@gmail.com \
    --cc=zzsheng@gmail.com \
    /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.