summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk-rl.c
diff options
context:
space:
mode:
authorHans Holmberg <hans.holmberg@cnexlabs.com>2017-10-13 14:46:37 +0200
committerJens Axboe <axboe@kernel.dk>2017-10-13 16:34:57 +0200
commit03661b5f756c92b9924869334a2afa19753c4fe7 (patch)
treeabe763a5913b21f5fb86440cd54b2e8be2e69e4e /drivers/lightnvm/pblk-rl.c
parentlightnvm: pblk: free full lines during recovery (diff)
downloadlinux-03661b5f756c92b9924869334a2afa19753c4fe7.tar.xz
linux-03661b5f756c92b9924869334a2afa19753c4fe7.zip
lightnvm: pblk: start gc if needed during init
Start GC if needed, directly after init, as we might need to garbage collect in order to make room for user writes. Create a helper function that allows to kick GC without exposing the internals of the GC/rate-limiter interaction. Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-rl.c')
-rw-r--r--drivers/lightnvm/pblk-rl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lightnvm/pblk-rl.c b/drivers/lightnvm/pblk-rl.c
index 0896439a91b0..739f855d4216 100644
--- a/drivers/lightnvm/pblk-rl.c
+++ b/drivers/lightnvm/pblk-rl.c
@@ -96,7 +96,7 @@ unsigned long pblk_rl_nr_free_blks(struct pblk_rl *rl)
*
* Only the total number of free blocks is used to configure the rate limiter.
*/
-static void pblk_rl_update_rates(struct pblk_rl *rl)
+void pblk_rl_update_rates(struct pblk_rl *rl)
{
struct pblk *pblk = container_of(rl, struct pblk, rl);
unsigned long free_blocks = pblk_rl_nr_free_blks(rl);