lightnvm: reserved space calculation incorrect
authorJavier González <jg@lightnvm.io>
Fri, 6 May 2016 18:03:21 +0000 (20:03 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 6 May 2016 18:51:10 +0000 (12:51 -0600)
commit116f7d4a21fe450efc652c4850eb27cda36c9db0
treefb8ef533ff5d272f5b1ef496f357cc538a5c8204
parent6d5be9590b5e15124e3c8b319c8d7ce01abcf07d
lightnvm: reserved space calculation incorrect

The nvm_dev->max_pages_per_blk variable was removed in favor of the new
nvm->sec_per_blk variable. The ->max_pages_per_blk variable was still
used in rrpc_capacity, reporting the reserved capacity to zero. Replace
with ->sec_per_blk to calculate the reserved area again.

Signed-off-by: Javier González <javier@cnexlabs.com>
Updated patch description. Was "lightnvm: eliminate redundant variable"
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/rrpc.c
include/linux/lightnvm.h