null_blk: warning on ignored submit_queues param
authorMatias Bjorling <m@bjorling.me>
Wed, 18 Dec 2013 12:41:44 +0000 (13:41 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 19 Dec 2013 15:09:43 +0000 (08:09 -0700)
Let the user know when the number of submission queues are being
ignored.

Signed-off-by: Matias Bjorling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk.c

index f0aeb2a7a9ca3e764918bdbe092eb53f2179c542..8f2e7c330d6df3b42734d4c66ef2c6690c465402 100644 (file)
@@ -590,9 +590,12 @@ static int __init null_init(void)
        }
 #endif
 
-       if (queue_mode == NULL_Q_MQ && use_per_node_hctx)
+       if (queue_mode == NULL_Q_MQ && use_per_node_hctx) {
+               if (submit_queues > 0)
+                       pr_warn("null_blk: submit_queues param is set to %u.",
+                                                       nr_online_nodes);
                submit_queues = nr_online_nodes;
-       else if (submit_queues > nr_cpu_ids)
+       else if (submit_queues > nr_cpu_ids)
                submit_queues = nr_cpu_ids;
        else if (!submit_queues)
                submit_queues = 1;