linux-stable/drivers/block
Yi Sun b7bfaea8f5 virtio-blk: Ensure no requests in virtqueues before deleting vqs.
[ Upstream commit 4ce6e2db00 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:13:34 +01:00
..
aoe
drbd treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
mtip32xx
paride
rsxx block: rsxx: fix error return code of rsxx_pci_probe() 2021-03-17 17:03:56 +01:00
xen-blkback xen-blkback: fix compatibility bug with single page rings 2021-05-14 09:44:23 +02:00
zram zram: off by one in read_block_state() 2021-11-17 09:48:47 +01:00
amiflop.c
ataflop.c block: ataflop: fix breakage introduced at blk-mq refactoring 2021-11-17 09:48:38 +01:00
brd.c
cryptoloop.c cryptoloop: add a deprecation warning 2021-09-12 08:56:40 +02:00
floppy.c floppy: use a statically allocated error counter 2022-05-25 09:14:31 +02:00
Kconfig remove the sx8 block driver 2023-11-08 11:23:42 +01:00
loop.c loop: Select I/O scheduler 'none' from inside add_disk() 2023-08-11 11:53:54 +02:00
loop.h
Makefile remove the sx8 block driver 2023-11-08 11:23:42 +01:00
nbd.c nbd: Add the maximum limit of allocated index in nbd_dev_add 2023-07-27 08:37:41 +02:00
null_blk.h
null_blk_main.c null_blk: fix ida error handling in null_add_dev() 2022-08-25 11:17:59 +02:00
null_blk_zoned.c drivers/block/null_blk/main: Fix a double free in null_init. 2021-05-14 09:44:26 +02:00
pktcdvd.c
ps3disk.c ps3disk: use the default segment boundary 2020-06-24 17:50:15 +02:00
ps3vram.c
rbd.c rbd: don't move requests to the running list on errors 2024-02-23 08:24:52 +01:00
rbd_types.h
skd_main.c
skd_s1120.h
sunvdc.c block: sunvdc: add check for mdesc_grab() returning NULL 2023-03-22 13:28:06 +01:00
swim.c
swim3.c
swim_asm.S
umem.c
umem.h
virtio_blk.c virtio-blk: Ensure no requests in virtqueues before deleting vqs. 2024-03-01 13:13:34 +01:00
xen-blkfront.c xen/blkfront: Only check REQ_FUA for writes 2023-06-21 15:44:09 +02:00
xsysace.c
z2ram.c