]> git.karo-electronics.de Git - karo-tx-linux.git/commit
lightnvm: calculate rrpc total blocks and sectors up front
authorWenwei Tao <ww.tao0320@gmail.com>
Fri, 6 May 2016 18:03:00 +0000 (20:03 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 6 May 2016 18:51:10 +0000 (12:51 -0600)
commit66e3d07f75c6472d7198920488330634c118b255
tree21054b481154bd7e0a1250023f7051eef3f0bb3a
parent7f7c5d03c0e8e177d1ed1c6412ae035e8eff35de
lightnvm: calculate rrpc total blocks and sectors up front

Calculate rrpc total blocks and sectors up front, make sense
to use them. For example, we use rrpc->nr_sects to calculate rrpc
area size, but it makes no sense if we don't initialize it up front,
since it would be zero until we finish rrpc luns init.

Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/rrpc.c