Skip to content

Commit

Permalink
lightnvm: pblk: use right metadata buffer for recovery
Browse files Browse the repository at this point in the history
Fix bad metadata buffer assignations introduced when refactoring the
medatada write path.

Fixes: dd2a434 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>
  • Loading branch information
Javier González authored and Jens Axboe committed Jun 30, 2017
1 parent 1088812 commit 8224cbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/lightnvm/pblk-recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8224cbd

Please sign in to comment.