diff options
author | weiping zhang <zhangweiping@didichuxing.com> | 2017-08-02 18:26:39 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-07 23:15:37 +0200 |
commit | 558ab300c8f2e8843cbd2f30b358815b01b790e1 (patch) | |
tree | a76fd86e1cc547eb7b8ef8d45d1b7488d207c59a /drivers | |
parent | block: Add comment to submit_bio_wait() (diff) | |
download | linux-558ab300c8f2e8843cbd2f30b358815b01b790e1.tar.xz linux-558ab300c8f2e8843cbd2f30b358815b01b790e1.zip |
null_blk: simplify logic for use_per_node_hctx
make sure submit_queues equal nr_online_nodes.
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.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 85c24cace973..72e2bc5017d4 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -733,9 +733,6 @@ static int null_add_dev(void) spin_lock_init(&nullb->lock); - if (queue_mode == NULL_Q_MQ && use_per_node_hctx) - submit_queues = nr_online_nodes; - rv = setup_queues(nullb); if (rv) goto out_free_nullb; @@ -845,8 +842,8 @@ static int __init null_init(void) } if (queue_mode == NULL_Q_MQ && use_per_node_hctx) { - if (submit_queues < nr_online_nodes) { - pr_warn("null_blk: submit_queues param is set to %u.", + if (submit_queues != nr_online_nodes) { + pr_warn("null_blk: submit_queues param is set to %u.\n", nr_online_nodes); submit_queues = nr_online_nodes; } |