diff options
author | Chao Yu <chao2.yu@samsung.com> | 2016-01-12 07:49:16 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-01-12 16:21:15 +0100 |
commit | bdded1552085b12d23c9be76147d2e96647a098f (patch) | |
tree | 96fa04d75f82de069dadf66569a611e24e2c3848 /drivers/lightnvm | |
parent | lightnvm: fix bio submission issue (diff) | |
download | linux-bdded1552085b12d23c9be76147d2e96647a098f.tar.xz linux-bdded1552085b12d23c9be76147d2e96647a098f.zip |
lightnvm: fix incorrect nr_free_blocks stat
When initing bad block list in gennvm_block_bb, once we move bad block
from free_list to bb_list, we should maintain both stat info
nr_free_blocks and nr_bad_blocks. So this patch fixes to add missing
operation related to nr_free_blocks.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r-- | drivers/lightnvm/gennvm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c index 62c6f4d11f24..2a96ff6923f0 100644 --- a/drivers/lightnvm/gennvm.c +++ b/drivers/lightnvm/gennvm.c @@ -89,6 +89,7 @@ static int gennvm_block_bb(struct ppa_addr ppa, int nr_blocks, u8 *blks, list_move_tail(&blk->list, &lun->bb_list); lun->vlun.nr_bad_blocks++; + lun->vlun.nr_free_blocks--; } return 0; |