elevator: lookup mq vs non-mq elevators
authorJens Axboe <axboe@kernel.dk>
Wed, 25 Oct 2017 18:33:42 +0000 (12:33 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:13:10 +0000 (14:13 +0100)
commit2a35d21a4d12fe774c46d17831e2938781179c83
tree8469cc35b853d16023cdefd859148b08bc00a988
parent5d01e063296a80e93abe93803602e5cf37309865
elevator: lookup mq vs non-mq elevators

[ Upstream commit 2527d99789e248576ac8081530cd4fd88730f8c7 ]

If an IO scheduler is selected via elevator= and it doesn't match
the driver in question wrt blk-mq support, then we fail to boot.

The elevator= parameter is deprecated and only supported for
non-mq devices. Augment the elevator lookup API so that we
pass in if we're looking for an mq capable scheduler or not,
so that we only ever return a valid type for the queue in
question.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196695
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/elevator.c