block: store elevator state in request
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Oct 2021 15:44:38 +0000 (09:44 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 14:51:52 +0000 (08:51 -0600)
commit2ff0682da6e09c1e0db63a2d2abcd4efb531c8db
tree33c4b58cfd5f1e64981aa654043081e531d0e4fe
parent90b8faa0e8de1b02b619fb33f6c6e1e13e7d1d70
block: store elevator state in request

Add an rq private RQF_ELV flag, which tells the block layer that this
request was initialized on a queue that has an IO scheduler attached.
This allows for faster checking in the fast path, rather than having to
deference rq->q later on.

Elevator switching does full quiesce of the queue before detaching an
IO scheduler, so it's safe to cache this in the request itself.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-sched.h
block/blk-mq.c
include/linux/blk-mq.h