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>
This commit is contained in:

committed by
Jens Axboe

parent
37ce33d575
commit
03661b5f75
@@ -1025,6 +1025,10 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk,
|
||||
pblk->rwb.nr_entries);
|
||||
|
||||
wake_up_process(pblk->writer_ts);
|
||||
|
||||
/* Check if we need to start GC */
|
||||
pblk_gc_should_kick(pblk);
|
||||
|
||||
return pblk;
|
||||
|
||||
fail_stop_writer:
|
||||
|
Reference in New Issue
Block a user