diff options
author | Javier González <jg@lightnvm.io> | 2018-03-30 00:04:59 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-03-29 17:29:09 -0600 |
commit | e411b33117d1967d2a5784ed32385e566a871d12 (patch) | |
tree | 449847038892b6fe9203e467cf144684f85bd38e /drivers/lightnvm/pblk-core.c | |
parent | 3c05ef115c696392d9703be3fe014100ec77864d (diff) | |
download | op-kernel-dev-e411b33117d1967d2a5784ed32385e566a871d12.zip op-kernel-dev-e411b33117d1967d2a5784ed32385e566a871d12.tar.gz |
lightnvm: pblk: refactor bad block identification
In preparation for the OCSSD 2.0 spec. bad block identification,
refactor the current code to generalize bad block get/set functions and
structures.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-core.c')
-rw-r--r-- | drivers/lightnvm/pblk-core.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 8848443..5c363cc 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -1025,7 +1025,6 @@ static int pblk_line_init_bb(struct pblk *pblk, struct pblk_line *line, struct nvm_geo *geo = &dev->geo; struct pblk_line_meta *lm = &pblk->lm; struct pblk_line_mgmt *l_mg = &pblk->l_mg; - int nr_bb = 0; u64 off; int bit = -1; int emeta_secs; @@ -1041,8 +1040,6 @@ static int pblk_line_init_bb(struct pblk *pblk, struct pblk_line *line, bitmap_or(line->map_bitmap, line->map_bitmap, l_mg->bb_aux, lm->sec_per_line); line->sec_in_line -= geo->sec_per_chk; - if (bit >= lm->emeta_bb) - nr_bb++; } /* Mark smeta metadata sectors as bad sectors */ |