diff options
| author | Li Chen <me@linux.beauty> | 2026-06-30 17:23:36 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2026-08-19 06:38:46 -0400 |
| commit | 36e33955aee0020f9fb9fa4d65f0b8a152c78752 (patch) | |
| tree | 5249255bbf9c2e65b06556877003cc5a7a26a1b6 /scripts | |
| parent | 8de2bc46dbeadbcb6c1e119d72ffa59a630195fb (diff) | |
| download | linux-stable-36e33955aee0020f9fb9fa4d65f0b8a152c78752.tar.gz linux-stable-36e33955aee0020f9fb9fa4d65f0b8a152c78752.zip | |
nvdimm: virtio_pmem: converge broken virtqueue to -EIO
dmesg reports virtqueue failure and device reset:
virtio_pmem virtio2: failed to send command to
virtio pmem device, no free slots in the virtqueue
virtio_pmem virtio2: virtio pmem device
needs a reset
virtio_pmem_flush() can wait for a free virtqueue descriptor (-ENOSPC).
It can also wait for host completion. If the request virtqueue breaks,
those waiters may never make progress. One example is notify failure from
virtqueue_kick().
Track a device-level broken state and converge the failure to -EIO. New
requests fail fast, -ENOSPC waiters are unlinked and woken, and the
currently submitted request is woken so its host_acked waiter can return
without waiting forever for host completion. Completed requests are forced
to report an error after the queue is marked broken.
Also serialize async parent-bio flush work against the broken state with
pmem_lock. That way remove and freeze either drain work queued before
virtio_pmem_mark_broken(), or later callers see nvdimm_flush() complete
the parent bio synchronously with -EIO instead of queuing work after the
drain point.
Do not detach unused buffers from an active virtqueue. Runtime
broken-queue handling only stops new submissions and wakes local waiters.
Removal resets the device first. It then drains request tokens. After
that, the device no longer owns the buffers when the virtqueue reference
is dropped.
Closes: https://lore.kernel.org/r/202512250116.ewtzlD0g-lkp@intel.com/
Signed-off-by: Li Chen <me@linux.beauty>
Link: https://lore.kernel.org/r/202512250116.ewtzlD0g-lkp@intel.com/
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260630092338.2094628-12-me@linux.beauty>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
