Commit f40a62d2 authored by Zhoujie Wu's avatar Zhoujie Wu Committed by Jens Axboe

lightnvm: pblk: ignore the smeta oob area scan

The smeta area l2p mapping is empty, and actually the
recovery procedure only need to restore data sector's l2p
mapping. So ignore the smeta oob scan.
Signed-off-by: default avatarZhoujie Wu <zjwu@marvell.com>
Reviewed-by: default avatarJavier González <javier@javigon.com>
Reviewed-by: default avatarHans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: default avatarMatias Bjørling <mb@lightnvm.io>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c4576aed
...@@ -334,6 +334,7 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line, ...@@ -334,6 +334,7 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line,
struct pblk_recov_alloc p) struct pblk_recov_alloc p)
{ {
struct nvm_tgt_dev *dev = pblk->dev; struct nvm_tgt_dev *dev = pblk->dev;
struct pblk_line_meta *lm = &pblk->lm;
struct nvm_geo *geo = &dev->geo; struct nvm_geo *geo = &dev->geo;
struct ppa_addr *ppa_list; struct ppa_addr *ppa_list;
struct pblk_sec_meta *meta_list; struct pblk_sec_meta *meta_list;
...@@ -342,12 +343,12 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line, ...@@ -342,12 +343,12 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line,
void *data; void *data;
dma_addr_t dma_ppa_list, dma_meta_list; dma_addr_t dma_ppa_list, dma_meta_list;
__le64 *lba_list; __le64 *lba_list;
u64 paddr = 0; u64 paddr = pblk_line_smeta_start(pblk, line) + lm->smeta_sec;
bool padded = false; bool padded = false;
int rq_ppas, rq_len; int rq_ppas, rq_len;
int i, j; int i, j;
int ret; int ret;
u64 left_ppas = pblk_sec_in_open_line(pblk, line); u64 left_ppas = pblk_sec_in_open_line(pblk, line) - lm->smeta_sec;
if (pblk_line_wp_is_unbalanced(pblk, line)) if (pblk_line_wp_is_unbalanced(pblk, line))
pblk_warn(pblk, "recovering unbalanced line (%d)\n", line->id); pblk_warn(pblk, "recovering unbalanced line (%d)\n", line->id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment