From: sashiko-bot@kernel.org
To: Qihang <q.h.hack.winter@gmail.com>
Cc: virtualization@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH v5] fuse: virtio-fs: fix lost wakeup on a full virtqueue
Date: Mon, 23 Nov 2026 06:43:01 +0000 [thread overview]
Message-ID: <sashiko-outbox-228776@kernel.org> (raw)
In-Reply-To: <20261123063609.82014-1-q.h.hack.winter@gmail.com>
> virtio_fs_enqueue_req() drops fsvq->lock when virtqueue_add_sgs() fails
> with -ENOSPC, and the caller requeues the request in a second critical
> section. Completion processing can run in between: it reaps a
> completion, finds queued_reqs empty, and does not schedule dispatch. If
> the queue then goes idle, the request can remain on queued_reqs and keep
> in_flight above zero. A subsequent virtio_fs_drain_queue() can wait
> indefinitely.
>
> On -ENOSPC, add the request to queued_reqs before releasing fsvq->lock,
> as send_forget_request() does. This prevents
> virtio_fs_requests_done_work() from checking queued_reqs between the
> failed submission and the insertion. Both callers can then return
> immediately on -ENOSPC.
>
> Free req->argbuf before adding the request to queued_reqs. Once
> fsvq->lock is released, the dispatch worker may already have taken the
> request, so the -ENOSPC return path must skip any further access to req.
>
> Count the request in in_flight on its first submission. A retry keeps
> the existing count.
>
> Fixes: 106e4df1206b ("virtio-fs: improved request latencies when Virtio queue is full")
> Cc: stable@vger.kernel.org # 6.11+
> Link: https://lore.kernel.org/all/sashiko-outbox-204365@kernel.org/
> Signed-off-by: Qihang <q.h.hack.winter@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123063609.82014-1-q.h.hack.winter@gmail.com?part=1
next prev parent reply other threads:[~2026-11-23 6:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 9:17 [PATCH v4] fuse: virtio-fs: fix lost wakeup on a full virtqueue Qihang
2026-11-13 9:28 ` sashiko-bot
2026-11-17 12:19 ` Li Wang
2026-11-23 6:36 ` [PATCH v5] " Qihang
2026-11-23 6:43 ` sashiko-bot [this message]
2026-11-24 10:55 ` Miklos Szeredi
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=sashiko-outbox-228776@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=q.h.hack.winter@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox