Skip to content

Commit

Permalink
blk-mq: move update of tags->rqs to __blk_mq_alloc_request()
Browse files Browse the repository at this point in the history
No functional difference, it just makes a little more sense to update
the tag map where we actually allocate the tag.

Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Tested-by: Sagi Grimberg <[email protected]>
  • Loading branch information
osandov authored and axboe committed Mar 2, 2017
1 parent 5974839 commit 562bef4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions block/blk-mq-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ struct request *blk_mq_sched_get_request(struct request_queue *q,
rq = __blk_mq_alloc_request(data, op);
} else {
rq = __blk_mq_alloc_request(data, op);
if (rq)
data->hctx->tags->rqs[rq->tag] = rq;
}

if (rq) {
Expand Down
1 change: 1 addition & 0 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ struct request *__blk_mq_alloc_request(struct blk_mq_alloc_data *data,
}
rq->tag = tag;
rq->internal_tag = -1;
data->hctx->tags->rqs[rq->tag] = rq;
}

blk_mq_rq_ctx_init(data->q, data->ctx, rq, op);
Expand Down

0 comments on commit 562bef4

Please sign in to comment.