Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Li Wang" <liwang@kylinos.cn>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH] virtiofs: fix potential unmount or device removal hang due to stuck FORGETs
Date: Mon, 23 Nov 2026 10:00:31 +0000	[thread overview]
Message-ID: <sashiko-outbox-229016@kernel.org> (raw)
In-Reply-To: <20261123095455.88622-1-liwang@kylinos.cn>

> virtqueue_add_outbuf() returns -ENOSPC when the virtqueue is full.  On
> this path it can also return -ENOMEM, when a split-ring DMA mapping
> fails, or -EIO, when the virtqueue is broken or a packed-ring mapping
> fails.  send_forget_request() turns only -ENOSPC into 1, so
> virtio_fs_hiprio_dispatch_work() stops and waits for a completion.  Any
> other error frees that FORGET and drops its in_flight count, then
> returns the negative errno.  The worker treats every non-zero return as
> a reason to stop, so the rest of queued_reqs is left unexamined.
> 
> hiprio dispatch_work is scheduled only from
> virtio_fs_hiprio_done_work(), which runs from that virtqueue interrupt.
> Once no descriptor is outstanding, the device raises no interrupt and
> nothing walks the list.  virtio_fs_send_forget() submits a new FORGET
> directly and does not schedule the worker.  The queued entries are
> reached again only if that new FORGET is placed on the virtqueue and
> [ ... ]
> continues with the rest of queued_reqs.  A full queue still returns 1.
> 
> Fixes: a62a8ef9d97d ("virtio-fs: add virtiofs filesystem")
> Cc: stable@vger.kernel.org
> Signed-off-by: Li Wang <liwang@kylinos.cn>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261123095455.88622-1-liwang@kylinos.cn?part=1

  reply	other threads:[~2026-11-23 10:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  9:54 [PATCH] virtiofs: fix potential unmount or device removal hang due to stuck FORGETs Li Wang
2026-11-23 10:00 ` sashiko-bot [this message]
2026-11-24 11:13 ` 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-229016@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=liwang@kylinos.cn \
    --cc=mst@redhat.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