summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorweiping zhang <zhangweiping@didichuxing.com>2017-08-03 00:27:37 +0800
committerJens Axboe <axboe@kernel.dk>2017-08-07 15:15:38 -0600
commitd424681cc9ebaaeac2b6af842d2f497ba7ccf349 (patch)
treec28044f1134edf417ef7e7ba6224c14242932175 /drivers
parent558ab300c8f2e8843cbd2f30b358815b01b790e1 (diff)
null_blk: make sure submit_queues > 0
set submit_queues to 1 by default, and make sure it's value > 0. Signed-off-by: weiping zhang <zhangweiping@didichuxing.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/null_blk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 72e2bc5017d4..f1d0ca020999 100644
--- a/drivers/block/null_blk.c
+++ b/drivers/block/null_blk.c
@@ -65,7 +65,7 @@ enum {
NULL_Q_MQ = 2,
};
-static int submit_queues;
+static int submit_queues = 1;
module_param(submit_queues, int, S_IRUGO);
MODULE_PARM_DESC(submit_queues, "Number of submission queues");
@@ -849,7 +849,7 @@ static int __init null_init(void)
}
} else if (submit_queues > nr_cpu_ids)
submit_queues = nr_cpu_ids;
- else if (!submit_queues)
+ else if (submit_queues <= 0)
submit_queues = 1;
if (queue_mode == NULL_Q_MQ && shared_tags) {