Commit 98379a12 authored by Javier González's avatar Javier González Committed by Jens Axboe

lightnvm: use constant name instead of value

There is a constant to refer to free blocks. Use it when marking bad
blocks instead of using a constant value
Signed-off-by: default avatarJavier González <javier@cnexlabs.com>
Signed-off-by: default avatarMatias Bjørling <m@bjorling.me>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent eb00352b
......@@ -279,7 +279,7 @@ static int gen_block_bb(struct gen_dev *gn, struct ppa_addr ppa,
lun = &gn->luns[(dev->luns_per_chnl * ppa.g.ch) + ppa.g.lun];
for (i = 0; i < nr_blks; i++) {
if (blks[i] == 0)
if (blks[i] == NVM_BLK_T_FREE)
continue;
blk = &lun->vlun.blocks[i];
......
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