提交 d424681c 编写于 作者: W weiping zhang 提交者: Jens Axboe

null_blk: make sure submit_queues > 0

set submit_queues to 1 by default, and make sure it's value > 0.
Signed-off-by: Nweiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 558ab300
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册