aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk-write.c
diff options
context:
space:
mode:
authorJavier González <javier@cnexlabs.com>2017-10-13 08:46:09 -0400
committerJens Axboe <axboe@kernel.dk>2017-10-13 10:34:57 -0400
commite72ec1d31bcb6dffe325418c6d96f2fcab7c2654 (patch)
tree295cca8ebf81a6edd0a546edb8aab8a30efa1148 /drivers/lightnvm/pblk-write.c
parent0d880398cb6254ab3e110e2a8a659da65a56ffee (diff)
lightnvm: pblk: do not use a mempool for line bitmaps
pblk holds two sector bitmaps: one to keep track of the mapped sectors while the line is active and another one to keep track of the invalid sectors. The latter is kept during the whole live of the line, until it is recycled. Since we cannot guarantee forward progress for the mempool in this case, get rid of the mempool and simply allocate memory through kmalloc. Reported-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Javier González <javier@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-write.c')
-rw-r--r--drivers/lightnvm/pblk-write.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/lightnvm/pblk-write.c b/drivers/lightnvm/pblk-write.c
index c73b17bca06b..26c2b8345149 100644
--- a/drivers/lightnvm/pblk-write.c
+++ b/drivers/lightnvm/pblk-write.c
@@ -411,8 +411,6 @@ int pblk_submit_meta_io(struct pblk *pblk, struct pblk_line *meta_line)
411 if (emeta->mem >= lm->emeta_len[0]) { 411 if (emeta->mem >= lm->emeta_len[0]) {
412 spin_lock(&l_mg->close_lock); 412 spin_lock(&l_mg->close_lock);
413 list_del(&meta_line->list); 413 list_del(&meta_line->list);
414 WARN(!bitmap_full(meta_line->map_bitmap, lm->sec_per_line),
415 "pblk: corrupt meta line %d\n", meta_line->id);
416 spin_unlock(&l_mg->close_lock); 414 spin_unlock(&l_mg->close_lock);
417 } 415 }
418 416
@@ -456,7 +454,7 @@ retry:
456 return 0; 454 return 0;
457 } 455 }
458 meta_line = list_first_entry(&l_mg->emeta_list, struct pblk_line, list); 456 meta_line = list_first_entry(&l_mg->emeta_list, struct pblk_line, list);
459 if (bitmap_full(meta_line->map_bitmap, lm->sec_per_line)) 457 if (meta_line->emeta->mem >= lm->emeta_len[0])
460 goto retry; 458 goto retry;
461 spin_unlock(&l_mg->close_lock); 459 spin_unlock(&l_mg->close_lock);
462 460