virtio-pmem: ignore empty queue notifications
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> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20260106083859.380338-1-me@linux.beauty> (cherry picked from commit efd581a8cd4405ca183ecd017072b0c878802d69) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
be88ad424c
commit
cfc706b38e
1 changed files with 0 additions and 1 deletions
|
|
@ -74,7 +74,6 @@ static void virtio_pmem_flush(VirtIODevice *vdev, VirtQueue *vq)
|
||||||
trace_virtio_pmem_flush_request();
|
trace_virtio_pmem_flush_request();
|
||||||
req_data = virtqueue_pop(vq, sizeof(VirtIODeviceRequest));
|
req_data = virtqueue_pop(vq, sizeof(VirtIODeviceRequest));
|
||||||
if (!req_data) {
|
if (!req_data) {
|
||||||
virtio_error(vdev, "virtio-pmem missing request data");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue