blk-mq: don't call into depth limiting for reserved tags
authorJens Axboe <axboe@kernel.dk>
Wed, 9 May 2018 19:28:50 +0000 (13:28 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 10 May 2018 17:27:12 +0000 (11:27 -0600)
It's not useful, they are internal and/or error handling recovery
commands.

Acked-by: Paolo Valente <paolo.valente@linaro.org>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c

index 4e9d83594cca40577b624a8cd304ff41977e5d4f..64630caaf27e15b1bc0ecdfad6c3164da4b5d840 100644 (file)
@@ -360,9 +360,11 @@ static struct request *blk_mq_get_request(struct request_queue *q,
 
                /*
                 * Flush requests are special and go directly to the
-                * dispatch list.
+                * dispatch list. Don't include reserved tags in the
+                * limiting, as it isn't useful.
                 */
-               if (!op_is_flush(op) && e->type->ops.mq.limit_depth)
+               if (!op_is_flush(op) && e->type->ops.mq.limit_depth &&
+                   !(data->flags & BLK_MQ_REQ_RESERVED))
                        e->type->ops.mq.limit_depth(op, data);
        }