aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk-init.c
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2017-06-30 11:56:40 -0400
committerJens Axboe <axboe@kernel.dk>2017-06-30 13:08:18 -0400
commitee8d5c1ad54e48ec44b6ae9cf91144fcab6ebf83 (patch)
treecd5e6be51067d2eb47fa42c031a723644593d94f /drivers/lightnvm/pblk-init.c
parentde54e703a4229e4688eb77b32b1c27861384e22a (diff)
lightnvm: pblk: remove target using async. I/Os
When removing a pblk instance, pad the current line using asynchronous I/O. This reduces the removal time from ~1 minute in the worst case to a couple of seconds. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <matias@cnexlabs.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-init.c')
-rw-r--r--drivers/lightnvm/pblk-init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index b3fc310aa51c..025d8fe52154 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -841,6 +841,15 @@ static int pblk_writer_init(struct pblk *pblk)
841 841
842static void pblk_writer_stop(struct pblk *pblk) 842static void pblk_writer_stop(struct pblk *pblk)
843{ 843{
844 /* The pipeline must be stopped and the write buffer emptied before the
845 * write thread is stopped
846 */
847 WARN(pblk_rb_read_count(&pblk->rwb),
848 "Stopping not fully persisted write buffer\n");
849
850 WARN(pblk_rb_sync_count(&pblk->rwb),
851 "Stopping not fully synced write buffer\n");
852
844 if (pblk->writer_ts) 853 if (pblk->writer_ts)
845 kthread_stop(pblk->writer_ts); 854 kthread_stop(pblk->writer_ts);
846 del_timer(&pblk->wtimer); 855 del_timer(&pblk->wtimer);