lightnvm: pblk: use exact free block counter in RL
authorJavier González <[email protected]>
Fri, 5 Jan 2018 13:16:13 +0000 (14:16 +0100)
committerJens Axboe <[email protected]>
Fri, 5 Jan 2018 15:50:12 +0000 (08:50 -0700)
commita7689938ef4c8678ff78c44d11e4b0b897244714
treef16cd144c091907dd6ba81e495f4cfbac53c80a2
parentaed49e195af6b621d59b3e7f85aa5c5a71e90050
lightnvm: pblk: use exact free block counter in RL

Until now, pblk's rate-limiter has used a heuristic to reserve space for
GC I/O given that the over-provision area was fixed.

In preparation for allowing to define the over-provision area on target
creation, define a dedicated free_block counter in the rate-limiter to
track the number of blocks being used for user data.

Signed-off-by: Javier González <[email protected]>
Signed-off-by: Hans Holmberg <[email protected]>
Signed-off-by: Matias Bjørling <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
drivers/lightnvm/pblk-core.c
drivers/lightnvm/pblk-init.c
drivers/lightnvm/pblk-recovery.c
drivers/lightnvm/pblk-rl.c
drivers/lightnvm/pblk-sysfs.c
drivers/lightnvm/pblk.h