mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
lightnvm: do not protect block 0
Device blocks should be marked by the device and considered as bad blocks by the media manager. Thus, do not make assumptions on which blocks are going to be used by the device. In doing so we might lose valid blocks from the free list. Signed-off-by: Javier González <[email protected]> Signed-off-by: Matias Bjørling <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
bb3149792e
commit
8a3c95ab38
1 changed files with 0 additions and 6 deletions
|
|
@ -371,12 +371,6 @@ static int gen_blocks_init(struct nvm_dev *dev, struct gen_dev *gn)
|
|||
block->lun = &lun->vlun;
|
||||
block->id = cur_block_id++;
|
||||
|
||||
/* First block is reserved for device */
|
||||
if (unlikely(lun_iter == 0 && blk_iter == 0)) {
|
||||
lun->vlun.nr_free_blocks--;
|
||||
continue;
|
||||
}
|
||||
|
||||
list_add_tail(&block->list, &lun->free_list);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue