Commit 4ce6e2d
virtio-blk: Ensure no requests in virtqueues before deleting vqs.
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.
Function blk_mq_quiesce_queue() can ensure that requests have become
in_flight status, but it cannot guarantee that requests have been
processed by the device. Virtqueues should never be deleted before
all requests become complete status.
Function blk_mq_freeze_queue() ensure that all requests in virtqueues
become complete status. And no requests can enter in virtqueues.
Signed-off-by: Yi Sun <yi.sun@unisoc.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Link: https://lore.kernel.org/r/20240129085250.1550594-1-yi.sun@unisoc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 2a427b4 commit 4ce6e2d
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1593 | 1593 | | |
1594 | 1594 | | |
1595 | 1595 | | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
1596 | 1599 | | |
1597 | 1600 | | |
1598 | 1601 | | |
1599 | 1602 | | |
1600 | 1603 | | |
1601 | 1604 | | |
1602 | | - | |
1603 | | - | |
1604 | 1605 | | |
1605 | 1606 | | |
1606 | 1607 | | |
| |||
1618 | 1619 | | |
1619 | 1620 | | |
1620 | 1621 | | |
1621 | | - | |
| 1622 | + | |
1622 | 1623 | | |
1623 | 1624 | | |
1624 | 1625 | | |
| |||
0 commit comments