]> git.baikalelectronics.ru Git - kernel.git/commit
block: cancel all throttled bios in del_gendisk()
authorYu Kuai <yukuai3@huawei.com>
Fri, 18 Mar 2022 13:01:44 +0000 (21:01 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 18 Mar 2022 15:57:56 +0000 (09:57 -0600)
commit6f32130436ea12e15a8ca6b5adf481c6e390b1a9
tree53ea2561819061d557497972434541c212a7c2a2
parentd4a017a50791a29c45eca5b8547944f717f07f9e
block: cancel all throttled bios in del_gendisk()

Throttled bios can't be issued after del_gendisk() is done, thus
it's better to cancel them immediately rather than waiting for
throttle is done.

For example, if user thread is throttled with low bps while it's
issuing large io, and the device is deleted. The user thread will
wait for a long time for io to return.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220318130144.1066064-4-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c
block/blk-throttle.h
block/genhd.c