]> git.baikalelectronics.ru Git - kernel.git/commit
block: drain file system I/O on del_gendisk
authorChristoph Hellwig <hch@lst.de>
Wed, 29 Sep 2021 07:12:40 +0000 (09:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 16 Oct 2021 03:02:50 +0000 (21:02 -0600)
commitb44b1c0ab7ffef3e80abc4bc497da93ba6ceaa99
treedb504c9742b636b6460583e08f75ccbb95e1dfb4
parentd63e059554ca2839b0e4ed487b6f72e90d9f4f6b
block: drain file system I/O on del_gendisk

Instead of delaying draining of file system I/O related items like the
blk-qos queues, the integrity read workqueue and timeouts only when the
request_queue is removed, do that when del_gendisk is called.  This is
important for SCSI where the upper level drivers that control the gendisk
are separate entities, and the disk can be freed much earlier than the
request_queue, or can even be unbound without tearing down the queue.

Fixes: c73c5e0d3ea0 ("block: move the bdi from the request_queue to the gendisk")
Reported-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20210929071241.934472-5-hch@lst.de
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk.h
block/genhd.c
include/linux/genhd.h