Re: [PATCH 2/2] virtio-blk: Ensure no requests in virtqueues before deleting vqs.

From: Stefan Hajnoczi
Date: Mon Jan 22 2024 - 12:22:44 EST


On Mon, Jan 22, 2024 at 07:07:22PM +0800, Yi Sun wrote:
> Ensure no remaining requests in virtqueues before resetting vdev and
> deleting virtqueues. Otherwise these requests will never be completed.
> It may cause the system to become unresponsive. So it is better to place
> blk_mq_quiesce_queue() in front of virtio_reset_device().

QEMU's virtio-blk device implementation completes all requests during
device reset. Most device implementations have to do the same to avoid
leaving dangling requests in flight across device reset.

Which device implementation are you using and why is it safe for the
device is simply drop requests across device reset?

Stefan

Attachment: signature.asc
Description: PGP signature