Commit 4ca08500 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe

blk-mq: user (1 << order) to implement order_to_size()

Cc: Jörg-Volker Peetz <jvpeetz@web.de>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 48479005
...@@ -1130,12 +1130,7 @@ static void blk_mq_free_rq_map(struct blk_mq_tag_set *set, ...@@ -1130,12 +1130,7 @@ static void blk_mq_free_rq_map(struct blk_mq_tag_set *set,
static size_t order_to_size(unsigned int order) static size_t order_to_size(unsigned int order)
{ {
size_t ret = PAGE_SIZE; return (size_t)PAGE_SIZE << order;
while (order--)
ret *= 2;
return ret;
} }
static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set, static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,
......
Markdown is supported
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