blk-mq-sched: remove unused 'can_block' arg from blk_mq_sched_insert_request

After commit:

923218f616 ("blk-mq: don't allocate driver tag upfront for flush rq")

we no longer use the 'can_block' argument in
blk_mq_sched_insert_request(). Kill it.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>

Added actual commit message as to why it's being removed.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Mike Snitzer 2018-01-17 11:25:58 -05:00 коммит произвёл Jens Axboe
Родитель 396eaf21ee
Коммит 9e97d2951a
4 изменённых файлов: 10 добавлений и 12 удалений

Просмотреть файл

@ -61,7 +61,7 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
* be reused after dying flag is set * be reused after dying flag is set
*/ */
if (q->mq_ops) { if (q->mq_ops) {
blk_mq_sched_insert_request(rq, at_head, true, false, false); blk_mq_sched_insert_request(rq, at_head, true, false);
return; return;
} }

Просмотреть файл

@ -427,7 +427,7 @@ done:
} }
void blk_mq_sched_insert_request(struct request *rq, bool at_head, void blk_mq_sched_insert_request(struct request *rq, bool at_head,
bool run_queue, bool async, bool can_block) bool run_queue, bool async)
{ {
struct request_queue *q = rq->q; struct request_queue *q = rq->q;
struct elevator_queue *e = q->elevator; struct elevator_queue *e = q->elevator;

Просмотреть файл

@ -18,7 +18,7 @@ bool blk_mq_sched_try_insert_merge(struct request_queue *q, struct request *rq);
void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx); void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx);
void blk_mq_sched_insert_request(struct request *rq, bool at_head, void blk_mq_sched_insert_request(struct request *rq, bool at_head,
bool run_queue, bool async, bool can_block); bool run_queue, bool async);
void blk_mq_sched_insert_requests(struct request_queue *q, void blk_mq_sched_insert_requests(struct request_queue *q,
struct blk_mq_ctx *ctx, struct blk_mq_ctx *ctx,
struct list_head *list, bool run_queue_async); struct list_head *list, bool run_queue_async);

Просмотреть файл

@ -745,13 +745,13 @@ static void blk_mq_requeue_work(struct work_struct *work)
rq->rq_flags &= ~RQF_SOFTBARRIER; rq->rq_flags &= ~RQF_SOFTBARRIER;
list_del_init(&rq->queuelist); list_del_init(&rq->queuelist);
blk_mq_sched_insert_request(rq, true, false, false, true); blk_mq_sched_insert_request(rq, true, false, false);
} }
while (!list_empty(&rq_list)) { while (!list_empty(&rq_list)) {
rq = list_entry(rq_list.next, struct request, queuelist); rq = list_entry(rq_list.next, struct request, queuelist);
list_del_init(&rq->queuelist); list_del_init(&rq->queuelist);
blk_mq_sched_insert_request(rq, false, false, false, true); blk_mq_sched_insert_request(rq, false, false, false);
} }
blk_mq_run_hw_queues(q, false); blk_mq_run_hw_queues(q, false);
@ -1773,13 +1773,11 @@ static blk_status_t __blk_mq_issue_directly(struct blk_mq_hw_ctx *hctx,
return ret; return ret;
} }
static void __blk_mq_fallback_to_insert(struct blk_mq_hw_ctx *hctx, static void __blk_mq_fallback_to_insert(struct request *rq,
struct request *rq,
bool run_queue, bool bypass_insert) bool run_queue, bool bypass_insert)
{ {
if (!bypass_insert) if (!bypass_insert)
blk_mq_sched_insert_request(rq, false, run_queue, false, blk_mq_sched_insert_request(rq, false, run_queue, false);
hctx->flags & BLK_MQ_F_BLOCKING);
else else
blk_mq_request_bypass_insert(rq, run_queue); blk_mq_request_bypass_insert(rq, run_queue);
} }
@ -1811,7 +1809,7 @@ static blk_status_t __blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx,
return __blk_mq_issue_directly(hctx, rq, cookie); return __blk_mq_issue_directly(hctx, rq, cookie);
insert: insert:
__blk_mq_fallback_to_insert(hctx, rq, run_queue, bypass_insert); __blk_mq_fallback_to_insert(rq, run_queue, bypass_insert);
if (bypass_insert) if (bypass_insert)
return BLK_STS_RESOURCE; return BLK_STS_RESOURCE;
@ -1830,7 +1828,7 @@ static void blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx,
ret = __blk_mq_try_issue_directly(hctx, rq, cookie, false); ret = __blk_mq_try_issue_directly(hctx, rq, cookie, false);
if (ret == BLK_STS_RESOURCE) if (ret == BLK_STS_RESOURCE)
__blk_mq_fallback_to_insert(hctx, rq, true, false); __blk_mq_fallback_to_insert(rq, true, false);
else if (ret != BLK_STS_OK) else if (ret != BLK_STS_OK)
blk_mq_end_request(rq, ret); blk_mq_end_request(rq, ret);
@ -1960,7 +1958,7 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
} else if (q->elevator) { } else if (q->elevator) {
blk_mq_put_ctx(data.ctx); blk_mq_put_ctx(data.ctx);
blk_mq_bio_to_request(rq, bio); blk_mq_bio_to_request(rq, bio);
blk_mq_sched_insert_request(rq, false, true, true, true); blk_mq_sched_insert_request(rq, false, true, true);
} else { } else {
blk_mq_put_ctx(data.ctx); blk_mq_put_ctx(data.ctx);
blk_mq_bio_to_request(rq, bio); blk_mq_bio_to_request(rq, bio);