bcachefs/drivers/block
Ming Lei 7678abee08 virtio-blk: don't keep queue frozen during system suspend
Commit 4ce6e2db00 ("virtio-blk: Ensure no requests in virtqueues before
deleting vqs.") replaces queue quiesce with queue freeze in virtio-blk's
PM callbacks. And the motivation is to drain inflight IOs before suspending.

block layer's queue freeze looks very handy, but it is also easy to cause
deadlock, such as, any attempt to call into bio_queue_enter() may run into
deadlock if the queue is frozen in current context. There are all kinds
of ->suspend() called in suspend context, so keeping queue frozen in the
whole suspend context isn't one good idea. And Marek reported lockdep
warning[1] caused by virtio-blk's freeze queue in virtblk_freeze().

[1] https://lore.kernel.org/linux-block/ca16370e-d646-4eee-b9cc-87277c89c43c@samsung.com/

Given the motivation is to drain in-flight IOs, it can be done by calling
freeze & unfreeze, meantime restore to previous behavior by keeping queue
quiesced during suspend.

Cc: Yi Sun <yi.sun@unisoc.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: virtualization@lists.linux.dev
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Link: https://lore.kernel.org/r/20241112125821.1475793-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-12-05 10:00:20 -07:00
..
aoe block-6.12-20241004 2024-10-04 10:43:44 -07:00
drbd block-6.12-20241018 2024-10-18 15:53:00 -07:00
mtip32xx mtip32xx: Replace deprecated PCI functions 2024-11-06 07:54:50 -07:00
null_blk block: add a rq_list type 2024-11-13 12:04:58 -07:00
rnbd block/rnbd-srv: Add sanity check and remove redundant assignment 2024-08-28 08:50:35 -06:00
xen-blkback
zram zram: fix NULL pointer in comp_algorithm_show() 2024-11-14 22:49:19 -08:00
amiflop.c
ataflop.c
brd.c brd: decrease the number of allocated pages which discarded 2024-11-29 08:43:52 -07:00
floppy.c floppy: add missing MODULE_DESCRIPTION() macro 2024-07-10 00:22:03 -06:00
Kconfig reiserfs: The last commit 2024-10-21 16:29:38 +02:00
loop.c loop: Fix ABBA locking race 2024-11-19 07:54:56 -07:00
Makefile
n64cart.c
nbd.c nbd: correct the maximum value for discard sectors 2024-09-06 08:31:40 -06:00
pktcdvd.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ps3disk.c
ps3vram.c
rbd_types.h
rbd.c rbd: unfreeze queue after marking disk as dead 2024-11-07 16:27:22 -07:00
rnull.rs block: rnull: add missing MODULE_DESCRIPTION 2024-12-03 06:34:11 -07:00
sunvdc.c
swim3.c
swim_asm.S
swim.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ublk_drv.c ublk: fix error code for unsupported command 2024-11-19 09:19:46 -07:00
virtio_blk.c virtio-blk: don't keep queue frozen during system suspend 2024-12-05 10:00:20 -07:00
xen-blkfront.c
z2ram.c