block: cache request queue in bdev
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 14 Oct 2021 14:03:26 +0000 (15:03 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 12:17:36 +0000 (06:17 -0600)
commit17220ca5ce9606c1b015c4316fca18734c2df0bb
tree97ed1d00b00c850cc3f1cd08bf110418ccc0fd0b
parentabd45c159df5fcb7ac820e2825dac85de7c01c21
block: cache request queue in bdev

There are tons of places where we need to get a request_queue only
having bdev, which turns into bdev->bd_disk->queue. There are probably a
hundred of such places considering inline helpers, and enough of them
are in hot paths.

Cache queue pointer in struct block_device and make use of it in
bdev_get_queue().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/a3bfaecdd28956f03629d0ca5c63ebc096e1c809.1634219547.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bdev.c
block/genhd.c
include/linux/blk_types.h
include/linux/blkdev.h