summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk.h
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2017-06-30 17:56:40 +0200
committerJens Axboe <axboe@kernel.dk>2017-06-30 19:08:18 +0200
commitee8d5c1ad54e48ec44b6ae9cf91144fcab6ebf83 (patch)
treecd5e6be51067d2eb47fa42c031a723644593d94f /drivers/lightnvm/pblk.h
parentlightnvm: pblk: use vmalloc for GC data buffer (diff)
downloadlinux-ee8d5c1ad54e48ec44b6ae9cf91144fcab6ebf83.tar.xz
linux-ee8d5c1ad54e48ec44b6ae9cf91144fcab6ebf83.zip
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 '')
-rw-r--r--drivers/lightnvm/pblk.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
index cdad2c9edbdf..bf5b73fb345f 100644
--- a/drivers/lightnvm/pblk.h
+++ b/drivers/lightnvm/pblk.h
@@ -111,6 +111,13 @@ struct pblk_g_ctx {
void *private;
};
+/* Pad context */
+struct pblk_pad_rq {
+ struct pblk *pblk;
+ struct completion wait;
+ struct kref ref;
+};
+
/* Recovery context */
struct pblk_rec_ctx {
struct pblk *pblk;
@@ -674,6 +681,7 @@ void pblk_rb_sync_end(struct pblk_rb *rb, unsigned long *flags);
unsigned int pblk_rb_sync_point_count(struct pblk_rb *rb);
unsigned int pblk_rb_read_count(struct pblk_rb *rb);
+unsigned int pblk_rb_sync_count(struct pblk_rb *rb);
unsigned int pblk_rb_wrap_pos(struct pblk_rb *rb, unsigned int pos);
int pblk_rb_tear_down_check(struct pblk_rb *rb);