1. 30 11月, 2016 8 次提交
  2. 07 7月, 2016 5 次提交
  3. 07 5月, 2016 6 次提交
    • J
      lightnvm: rename nr_pages to nr_ppas on nvm_rq · 6d5be959
      Javier González 提交于
      The number of ppas contained on a request is not necessarily the number
      of pages that it maps to neither on the target nor on the device side.
      In order to avoid confusion, rename nr_pages to nr_ppas since it is what
      the variable actually contains.
      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>
      6d5be959
    • M
      lightnvm: expose gennvm_mark_blk to targets · 04a8aa17
      Matias Bjørling 提交于
      Targets can update a block state when having a reference to an
      in-memory virtual block. In the case that a target does not keep the
      block metadata in memory, it does not have a way to update this
      structure.
      
      Therefore, expose gennvm_mark_blk() through the media managers
      ->mark_blk() callback and let targets update the state structure through
      this callback.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      04a8aa17
    • M
      lightnvm: fix out of bound ppa lun id on bb tbl · 293a6e8e
      Matias Bjørling 提交于
      The ppa configured for retrieving the bad block table uses the internal
      lun id to setup the get bad block ppa. This increases monotonically
      with the number luns available. When configuring a ppa, the channel and
      lun must be specified separately, leading to an out of bound memory
      access in gennvm_block_bb when lun id goes beyond the luns available
      within a channel.
      
      Additional, remove out of bound check in gennvm_block_bb(), as it was a
      buggy to begin with.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      293a6e8e
    • M
      lightnvm: move responsibility for bad blk mgmt to target · a63d5cf2
      Matias Bjørling 提交于
      We move the responsibility of managing the persistent bad block table to
      the target. The target may choose to mark a block bad or retry writing
      to it. Never the less, it should be the target that makes the decision
      and not the media manager.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      a63d5cf2
    • M
      lightnvm: refactor device ops->get_bb_tbl() · e11903f5
      Matias Bjørling 提交于
      The device ops->get_bb_tbl() takes a callback, that allows the caller
      to use its own callback function to update its data structures in the
      returning function.
      
      This makes it difficult to send parameters to the callback, and usually
      is circumvented by small private structures, that both carry the callers
      state and any flags needed to fulfill the update.
      
      Refactor ops->get_bb_tbl() to fill a data buffer with the status of the
      blocks returned, and let the user call the callback function manually.
      That will provide the necessary flags and data structures and simplify
      the logic around ops->get_bb_tbl().
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      e11903f5
    • M
      lightnvm: move block fold outside of get_bb_tbl() · 22e8c976
      Matias Bjørling 提交于
      The get block table command returns a list of blocks and planes
      with their associated state. Users, such as gennvm and sysblk,
      manages all planes as a single virtual block.
      
      It was therefore  natural to fold the bad block list before it is
      returned. However, to allow users, which manages on a per-plane
      block level, to also use the interface, the get_bb_tbl interface is
      changed to not fold by default and instead let the caller fold if
      necessary.
      
      Reviewed by: Johannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      22e8c976
  4. 19 3月, 2016 4 次提交
  5. 04 3月, 2016 1 次提交
  6. 12 1月, 2016 7 次提交
  7. 29 12月, 2015 1 次提交
    • M
      lightnvm: wrong offset in bad blk lun calculation · c3293a9a
      Matias Bjørling 提交于
      dev->nr_luns reports the total number of luns available in a device
      while dev->luns_per_chnl is the number of luns per channel.
      
      When multiple channels are available, the offset is calculated from a
      channel and lun id into a linear array. As it multiplies with
      the total number of luns, we go out of bound when channel id > 0 and
      causes the kernel to panic when we read a protected kernel memory area.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      c3293a9a
  8. 08 12月, 2015 3 次提交
  9. 30 11月, 2015 2 次提交
  10. 20 11月, 2015 2 次提交
  11. 17 11月, 2015 1 次提交