lkml.org 
[lkml]   [2016]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 04/23] lightnvm: do not protect block 0
    Date
    From: Javier González <jg@lightnvm.io>

    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 <javier@cnexlabs.com>
    Signed-off-by: Matias Bjørling <m@bjorling.me>
    ---
    drivers/lightnvm/gennvm.c | 6 ------
    1 file changed, 6 deletions(-)

    diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c
    index 730d736..a7e17fa 100644
    --- a/drivers/lightnvm/gennvm.c
    +++ b/drivers/lightnvm/gennvm.c
    @@ -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);
    }

    --
    2.9.3
    \
     
     \ /
      Last update: 2016-11-28 22:43    [W:4.874 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site