block: bypass ->make_request_fn for blk-mq drivers

Call blk_mq_make_request when no ->make_request_fn is set.  This is
safe now that blk_alloc_queue always sets up the pointer for make_request
based drivers.  This avoids an indirect call in the blk-mq driver I/O
fast path, which is rather expensive due to spectre mitigations.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig
2020-04-25 09:53:36 +02:00
committed by Jens Axboe
parent ae3cc8d8ff
commit 8cf7961dab
4 changed files with 24 additions and 11 deletions

View File

@@ -578,4 +578,6 @@ static inline void blk_mq_cleanup_rq(struct request *rq)
rq->q->mq_ops->cleanup_rq(rq);
}
blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio);
#endif