diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-10-30 11:31:51 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 13:44:59 -0700 |
commit | 67cae4c948a5311121905a2a8740c50daf7f6478 (patch) | |
tree | e4d994179f16751b95f0080392844c6817a0e539 /block/blk-mq-sched.c | |
parent | ea4f995ee8b8f0578b3319949f2edd5d812fdb0a (diff) | |
download | linux-67cae4c948a5311121905a2a8740c50daf7f6478.tar.bz2 |
blk-mq: cleanup and improve list insertion
It's somewhat strange to have a list insertion function that
relies on the fact that the caller has mapped things correctly.
Pass in the hardware queue directly for insertion, which makes
for a much cleaner interface and implementation.
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-sched.c')
-rw-r--r-- | block/blk-mq-sched.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index 641df3f00632..66fda19be5a3 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -395,17 +395,11 @@ run: blk_mq_run_hw_queue(hctx, async); } -void blk_mq_sched_insert_requests(struct request_queue *q, +void blk_mq_sched_insert_requests(struct blk_mq_hw_ctx *hctx, struct blk_mq_ctx *ctx, struct list_head *list, bool run_queue_async) { - struct blk_mq_hw_ctx *hctx; struct elevator_queue *e; - struct request *rq; - - /* For list inserts, requests better be on the same hw queue */ - rq = list_first_entry(list, struct request, queuelist); - hctx = rq->mq_hctx; e = hctx->queue->elevator; if (e && e->type->ops.insert_requests) |