提交 98379a12 编写于 作者: J Javier González 提交者: 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: NJavier González <javier@cnexlabs.com>
Signed-off-by: NMatias Bjørling <m@bjorling.me>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册