Skip to content
Commit c2e82a23 authored by weiping zhang's avatar weiping zhang Committed by Jens Axboe
Browse files

blk-mq: fix nr_requests wrong value when modify it from sysfs



if blk-mq use "none" io scheduler, nr_request get a wrong value when
input a number > tag_set->queue_depth. blk_mq_tag_update_depth will get
the smaller one min(nr, set->queue_depth), and then q->nr_request get a
wrong value.

Reproduce:

echo none > /sys/block/nvme0n1/queue/scheduler
echo 1000000 > /sys/block/nvme0n1/queue/nr_requests
cat /sys/block/nvme0n1/queue/nr_requests
1000000

Signed-off-by: default avatarweiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a116895f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment