lightnvm: generalize rrpc ppa calculations
authorJavier González <javier@cnexlabs.com>
Thu, 3 Mar 2016 21:47:53 +0000 (14:47 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 3 Mar 2016 21:47:53 +0000 (14:47 -0700)
commitafb18e0ed862fae05aa41be278c1ddb87473c7b1
tree2c95318aed1cb4532cf078bdfe0fded9affdd4cb
parented2a92a6b4b8453a0c3a20da641ec79e4b3d7ca4
lightnvm: generalize rrpc ppa calculations

In rrpc, some calculations assume a certain configuration (e.g., 1 LUN,
1 sector per page). The reason behind this was that LightNVM used a
simple configuration with QEMU to test core features in the beginning.
This patch relaxes these assumptions and generalizes calculation,
allowing multiple luns to be used.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/rrpc.c
drivers/lightnvm/rrpc.h