Skip to content

virtio-blk: Avoid processing requests on the main context on restart

Sergio Lopez qemu-devel 1 version Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2virtio-blk: Refactor the code that processes queued requestshw/block/virtio-blk.c include/hw/virtio/virtio-blk.h+12 -50 replies
2/2virtio-blk: On restart, process queued requests in the proper contexthw/block/dataplane/virtio-blk.c hw/block/virtio-blk.c include/hw/virtio/virtio-blk.h+21 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] virtio-blk: Avoid processing requests on the main context on restart

On restart, we were scheduling a BH to process queued requests, which would run before starting up the data plane, leading to those requests being assigned and started on coroutines on the main context.

This could cause requests to be wrongly processed in parallel from different threads (the main thread and the iothread managing the data plane), potentially leading to multiple issues.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1812765

See "virtio-blk: Disable request queuing while switching contexts" for previous discussion:

- https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00304.html

Sergio Lopez (2):
virtio-blk: Refactor the code that processes queued requests
virtio-blk: On restart, process queued requests in the proper context

 include/hw/virtio/virtio-blk.h  |  1 +
 hw/block/dataplane/virtio-blk.c |  8 ++++++++
 hw/block/virtio-blk.c           | 30 +++++++++++++++++++++---------
 3 files changed, 30 insertions(+), 9 deletions(-)
Signature · 1 line
2.26.2