android_kernel_motorola_sm6375/drivers/block
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ming Lei d738f3215b virtio-blk: don't keep queue frozen during system suspend
[ Upstream commit 7678abee0867e6b7fb89aa40f6e9f575f755fb37 ]

Commit 4ce6e2db00de ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-09 13:23:32 +01:00
..
aoe aoe: fix the potential use-after-free problem in more places 2024-11-08 16:20:41 +01:00
drbd drbd: Add NULL check for net_conf to prevent dereference in state validation 2024-11-08 16:20:33 +01:00
mtip32xx
paride
rsxx
xen-blkback
zram zram: refuse to use zero sized block device as backing device 2025-01-09 13:23:29 +01:00
amiflop.c
ataflop.c
brd.c
cryptoloop.c
floppy.c
Kconfig remove the sx8 block driver 2023-11-08 11:23:42 +01:00
loop.c loop: loop_set_status_from_info() check before assignment 2024-04-13 12:51:30 +02:00
loop.h
Makefile remove the sx8 block driver 2023-11-08 11:23:42 +01:00
nbd.c nbd: null check for nla_nest_start 2024-03-26 18:22:13 -04:00
null_blk.h
null_blk_main.c null_blk: Fix the WARNING: modpost: missing MODULE_DESCRIPTION() 2024-06-16 13:28:45 +02:00
null_blk_zoned.c
pktcdvd.c
ps3disk.c
ps3vram.c
rbd.c rbd: don't assume RBD_LOCK_STATE_LOCKED for exclusive mappings 2024-08-19 05:33:40 +02: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: don't keep queue frozen during system suspend 2025-01-09 13:23:32 +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