Skip to content

Commit c728152

Browse files
Yufen Yuaxboe
authored andcommitted
blk-mq: get rid of the dead flush handle code path
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 <yuyufen@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 0546858 commit c728152

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

block/blk-mq-sched.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,6 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head,
422422
struct blk_mq_ctx *ctx = rq->mq_ctx;
423423
struct blk_mq_hw_ctx *hctx = rq->mq_hctx;
424424

425-
/* flush rq in flush machinery need to be dispatched directly */
426-
if (!(rq->rq_flags & RQF_FLUSH_SEQ) && op_is_flush(rq->cmd_flags)) {
427-
blk_insert_flush(rq);
428-
goto run;
429-
}
430-
431425
WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG));
432426

433427
if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) {

0 commit comments

Comments
 (0)