Reserved requests are internal to the driver and we wouldn't know if and how they should be merged. So disable the elevator for reserved tags. Signed-off-by: Hannes Reinecke <hare@xxxxxxxx> --- block/blk-mq.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 08a6248d8536..f6711a61ba3b 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -368,17 +368,18 @@ static struct request *blk_mq_get_request(struct request_queue *q, if (data->cmd_flags & REQ_NOWAIT) data->flags |= BLK_MQ_REQ_NOWAIT; + if (data->flags & BLK_MQ_REQ_RESERVED) + e = NULL; + if (e) { data->flags |= BLK_MQ_REQ_INTERNAL; /* * Flush requests are special and go directly to the - * dispatch list. Don't include reserved tags in the - * limiting, as it isn't useful. + * dispatch list. */ if (!op_is_flush(data->cmd_flags) && - e->type->ops.limit_depth && - !(data->flags & BLK_MQ_REQ_RESERVED)) + e->type->ops.limit_depth) e->type->ops.limit_depth(data->cmd_flags, data); } else { blk_mq_tag_busy(data->hctx); -- 2.16.4