Skip to content

Commit

Permalink
blk-mq: get rid of the dead flush handle code path
Browse files Browse the repository at this point in the history
After commit 923218f ("blk-mq: don't allocate driver tag upfront
for flush rq"), blk_mq_submit_bio() will call blk_insert_flush()
directly to handle flush request rather than blk_mq_sched_insert_request()
in the case of elevator.

Then, all flush request either have set RQF_FLUSH_SEQ flag when call
blk_mq_sched_insert_request(), or have inserted into hctx->dispatch.
So, remove the dead code path.

Signed-off-by: Yufen Yu <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Yufen Yu authored and axboe committed Oct 9, 2020
1 parent 0546858 commit c728152
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions block/blk-mq-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,6 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head,
struct blk_mq_ctx *ctx = rq->mq_ctx;
struct blk_mq_hw_ctx *hctx = rq->mq_hctx;

/* flush rq in flush machinery need to be dispatched directly */
if (!(rq->rq_flags & RQF_FLUSH_SEQ) && op_is_flush(rq->cmd_flags)) {
blk_insert_flush(rq);
goto run;
}

WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG));

if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) {
Expand Down

0 comments on commit c728152

Please sign in to comment.