From: "Michael S. Tsirkin" <mst@redhat.com>
To: Li Chen <me@linux.beauty>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] virtio-pmem: ignore empty queue notifications
Date: Tue, 6 Jan 2026 07:35:55 -0500 [thread overview]
Message-ID: <20260106073549-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20260106083859.380338-1-me@linux.beauty>
On Tue, Jan 06, 2026 at 04:38:59PM +0800, Li Chen wrote:
> From: Li Chen <chenl311@chinatelecom.cn>
>
> virtio_pmem_flush() treats a NULL return from virtqueue_pop() as a fatal
> error and calls virtio_error(), which puts the device into NEEDS_RESET.
>
> However, virtqueue handlers can be invoked when no element is available,
> so an empty queue should be handled as a benign no-op.
>
> With a Linux guest this avoids spurious NEEDS_RESET and the resulting
> -EIO propagation (e.g. EXT4 journal abort and remount-ro).
>
> Signed-off-by: Li Chen <me@linux.beauty>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/virtio/virtio-pmem.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
> index 3416ea1827..cec1072f78 100644
> --- a/hw/virtio/virtio-pmem.c
> +++ b/hw/virtio/virtio-pmem.c
> @@ -74,7 +74,6 @@ static void virtio_pmem_flush(VirtIODevice *vdev, VirtQueue *vq)
> trace_virtio_pmem_flush_request();
> req_data = virtqueue_pop(vq, sizeof(VirtIODeviceRequest));
> if (!req_data) {
> - virtio_error(vdev, "virtio-pmem missing request data");
> return;
> }
>
> --
> 2.52.0
next prev parent reply other threads:[~2026-01-06 12:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 8:38 [PATCH] virtio-pmem: ignore empty queue notifications Li Chen
2026-01-06 12:35 ` Michael S. Tsirkin [this message]
2026-02-05 22:00 ` Michael Tokarev
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=20260106073549-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=me@linux.beauty \
--cc=qemu-devel@nongnu.org \
/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.