diff options
-rw-r--r-- | drivers/lightnvm/pblk-cache.c | 10 | ||||
-rw-r--r-- | drivers/lightnvm/pblk-core.c | 2 | ||||
-rw-r--r-- | drivers/lightnvm/pblk-rb.c | 4 | ||||
-rw-r--r-- | drivers/lightnvm/pblk.h | 1 |
4 files changed, 10 insertions, 7 deletions
diff --git a/drivers/lightnvm/pblk-cache.c b/drivers/lightnvm/pblk-cache.c index 29a23111b31c..b1c6d7eb6115 100644 --- a/drivers/lightnvm/pblk-cache.c +++ b/drivers/lightnvm/pblk-cache.c | |||
@@ -44,13 +44,15 @@ retry: | |||
44 | goto out; | 44 | goto out; |
45 | } | 45 | } |
46 | 46 | ||
47 | if (unlikely(!bio_has_data(bio))) | ||
48 | goto out; | ||
49 | |||
50 | pblk_ppa_set_empty(&w_ctx.ppa); | 47 | pblk_ppa_set_empty(&w_ctx.ppa); |
51 | w_ctx.flags = flags; | 48 | w_ctx.flags = flags; |
52 | if (bio->bi_opf & REQ_PREFLUSH) | 49 | if (bio->bi_opf & REQ_PREFLUSH) { |
53 | w_ctx.flags |= PBLK_FLUSH_ENTRY; | 50 | w_ctx.flags |= PBLK_FLUSH_ENTRY; |
51 | pblk_write_kick(pblk); | ||
52 | } | ||
53 | |||
54 | if (unlikely(!bio_has_data(bio))) | ||
55 | goto out; | ||
54 | 56 | ||
55 | for (i = 0; i < nr_entries; i++) { | 57 | for (i = 0; i < nr_entries; i++) { |
56 | void *data = bio_data(bio); | 58 | void *data = bio_data(bio); |
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 99036befb571..a5750534efed 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c | |||
@@ -322,7 +322,7 @@ err: | |||
322 | return -1; | 322 | return -1; |
323 | } | 323 | } |
324 | 324 | ||
325 | static void pblk_write_kick(struct pblk *pblk) | 325 | void pblk_write_kick(struct pblk *pblk) |
326 | { | 326 | { |
327 | wake_up_process(pblk->writer_ts); | 327 | wake_up_process(pblk->writer_ts); |
328 | mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(1000)); | 328 | mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(1000)); |
diff --git a/drivers/lightnvm/pblk-rb.c b/drivers/lightnvm/pblk-rb.c index 1b74ec51a4ad..00cd1f20a196 100644 --- a/drivers/lightnvm/pblk-rb.c +++ b/drivers/lightnvm/pblk-rb.c | |||
@@ -349,7 +349,7 @@ void pblk_rb_write_entry_gc(struct pblk_rb *rb, void *data, | |||
349 | } | 349 | } |
350 | 350 | ||
351 | static int pblk_rb_flush_point_set(struct pblk_rb *rb, struct bio *bio, | 351 | static int pblk_rb_flush_point_set(struct pblk_rb *rb, struct bio *bio, |
352 | unsigned int pos) | 352 | unsigned int pos) |
353 | { | 353 | { |
354 | struct pblk_rb_entry *entry; | 354 | struct pblk_rb_entry *entry; |
355 | unsigned int sync, flush_point; | 355 | unsigned int sync, flush_point; |
@@ -419,7 +419,7 @@ void pblk_rb_flush(struct pblk_rb *rb) | |||
419 | if (pblk_rb_flush_point_set(rb, NULL, mem)) | 419 | if (pblk_rb_flush_point_set(rb, NULL, mem)) |
420 | return; | 420 | return; |
421 | 421 | ||
422 | pblk_write_should_kick(pblk); | 422 | pblk_write_kick(pblk); |
423 | } | 423 | } |
424 | 424 | ||
425 | static int pblk_rb_may_write_flush(struct pblk_rb *rb, unsigned int nr_entries, | 425 | static int pblk_rb_may_write_flush(struct pblk_rb *rb, unsigned int nr_entries, |
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h index 725bc1bfa849..34cc1d64a9d4 100644 --- a/drivers/lightnvm/pblk.h +++ b/drivers/lightnvm/pblk.h | |||
@@ -851,6 +851,7 @@ void pblk_map_rq(struct pblk *pblk, struct nvm_rq *rqd, unsigned int sentry, | |||
851 | int pblk_write_ts(void *data); | 851 | int pblk_write_ts(void *data); |
852 | void pblk_write_timer_fn(struct timer_list *t); | 852 | void pblk_write_timer_fn(struct timer_list *t); |
853 | void pblk_write_should_kick(struct pblk *pblk); | 853 | void pblk_write_should_kick(struct pblk *pblk); |
854 | void pblk_write_kick(struct pblk *pblk); | ||
854 | 855 | ||
855 | /* | 856 | /* |
856 | * pblk read path | 857 | * pblk read path |