diff --git a/block/blk-mq.c b/block/blk-mq.c index b4c9481f412bde99a31ae4ce0a596ad4e54d8007..4318788e1cf319db0c3db4f3be6eca99d41ef5aa 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1934,7 +1934,11 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) /* bypass scheduler for flush rq */ blk_insert_flush(rq); blk_mq_run_hw_queue(data.hctx, true); - } else if (plug && q->nr_hw_queues == 1) { + } else if (plug && (q->nr_hw_queues == 1 || q->mq_ops->commit_rqs)) { + /* + * Use plugging if we have a ->commit_rqs() hook as well, as + * we know the driver uses bd->last in a smart fashion. + */ struct request *last = NULL; blk_mq_put_ctx(data.ctx);