diff options
author | John Garry <john.garry@huawei.com> | 2021-10-05 18:23:34 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-18 06:17:02 -0600 |
commit | a7e7388dced47a10ca13ae95ca975ea2830f196b (patch) | |
tree | 88a38c33c253aa4947d64a25e3632f15db3d9f59 /block/blk-mq.c | |
parent | 4f245d5bf0f7432c881e22a77066160a6cba8e03 (diff) | |
download | linux-a7e7388dced47a10ca13ae95ca975ea2830f196b.tar.gz |
blk-mq: Add blk_mq_tag_update_sched_shared_sbitmap()
Put the functionality to update the sched shared sbitmap size in a common
function.
Since the same formula is always used to resize, and it can be got from
the request queue argument, so just pass the request queue pointer.
Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/1633429419-228500-10-git-send-email-john.garry@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 38cffe362a29..59bbfc935d87 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -3650,8 +3650,7 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr) q->nr_requests = nr; if (blk_mq_is_sbitmap_shared(set->flags)) { if (q->elevator) - sbitmap_queue_resize(&q->sched_bitmap_tags, - nr - set->reserved_tags); + blk_mq_tag_update_sched_shared_sbitmap(q); else blk_mq_tag_resize_shared_sbitmap(set, nr); } |