diff options
author | Javier González <jg@lightnvm.io> | 2017-06-30 17:56:38 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-30 19:08:18 +0200 |
commit | 8224cbd80be15908ecb6351b90291596e8bdcf79 (patch) | |
tree | 35bef37a6adb746528058bae684733f9dd50439b /drivers/lightnvm/pblk-recovery.c | |
parent | lightnvm: pblk: schedule if data is not ready (diff) | |
download | linux-8224cbd80be15908ecb6351b90291596e8bdcf79.tar.xz linux-8224cbd80be15908ecb6351b90291596e8bdcf79.zip |
lightnvm: pblk: use right metadata buffer for recovery
Fix bad metadata buffer assignations introduced when refactoring the
medatada write path.
Fixes: dd2a43437337 lightnvm: pblk: sched. metadata on write thread
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-recovery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c index 7e1c314f2766..6d58659fa3da 100644 --- a/drivers/lightnvm/pblk-recovery.c +++ b/drivers/lightnvm/pblk-recovery.c @@ -801,7 +801,7 @@ struct pblk_line *pblk_recov_l2p(struct pblk *pblk) set_bit(meta_line, &l_mg->meta_bitmap); smeta = l_mg->sline_meta[meta_line]; emeta = l_mg->eline_meta[meta_line]; - smeta_buf = smeta->buf; + smeta_buf = (struct line_smeta *)smeta; spin_unlock(&l_mg->free_lock); /* Order data lines using their sequence number */ @@ -888,9 +888,9 @@ struct pblk_line *pblk_recov_l2p(struct pblk *pblk) nr_bb = bitmap_weight(line->blk_bitmap, lm->blk_per_line); off -= nr_bb * geo->sec_per_pl; - memset(&emeta->buf, 0, lm->emeta_len[0]); - line->emeta = emeta; line->emeta_ssec = off; + line->emeta = emeta; + memset(line->emeta->buf, 0, lm->emeta_len[0]); if (pblk_line_read_emeta(pblk, line, line->emeta->buf)) { pblk_recov_l2p_from_oob(pblk, line); |