1. 07 5月, 2016 2 次提交
    • 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
  2. 19 3月, 2016 1 次提交
  3. 04 3月, 2016 1 次提交
  4. 05 2月, 2016 1 次提交
  5. 12 1月, 2016 3 次提交
    • M
      lightnvm: introduce mlc lower page table mappings · ca5927e7
      Matias Bjørling 提交于
      NAND MLC memories have both lower and upper pages. When programming,
      both of these must be written, before data can be read. However,
      these lower and upper pages might not placed at even and odd flash
      pages, but can be skipped. Therefore each flash memory has its lower
      pages defined, which can then be used when programming and to know when
      padding are necessary.
      
      This patch implements the lower page definition in the specification,
      and exposes it through a simple lookup table at dev->lptbl.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      ca5927e7
    • M
      lightnvm: return the get_bb_tbl return value · 22513215
      Matias Bjørling 提交于
      During get_bb_tbl, a callback is used to allow an user-specific scan
      function to be called. The callback may return an error, and in that
      case, the return value is overridden. However, the callback error is
      needed when the fault is a user error and not a kernel error. For
      example, when a user tries to initialize the same device twice. The
      get_bb_tbl callback should be able to communicate this.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      22513215
    • M
      lightnvm: refactor end_io functions for sync · 91276162
      Matias Bjørling 提交于
      To implement sync I/O support within the LightNVM core, the end_io
      functions are refactored to take an end_io function pointer instead of
      testing for initialized media manager, followed by calling its end_io
      function.
      
      Sync I/O can then be implemented using a callback that signal I/O
      completion. This is similar to the logic found in blk_to_execute_io().
      By implementing it this way, the underlying device I/Os submission logic
      is abstracted away from core, targets, and media managers.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      91276162
  6. 08 12月, 2015 2 次提交
  7. 04 12月, 2015 1 次提交
    • C
      NVMe: fix build with CONFIG_NVM enabled · ac02ddde
      Christoph Hellwig 提交于
      Looks like I didn't test with CONFIG_NVM enabled, and neither did
      the build bot.
      
      Most of this is really weird crazy shit in the lighnvm support, though.
      
      Struct nvme_ns is a structure for the NVM I/O command set, and it has
      no business poking into it.  Second this commit:
      
      commit 47b3115a
      Author: Wenwei Tao <ww.tao0320@gmail.com>
      Date:   Fri Nov 20 13:47:55 2015 +0100
      
          nvme: lightnvm: use admin queues for admin cmds
      
      Does even more crazy stuff.  If a function gets a request_queue parameter
      passed it'd better use that and not look for another one.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      ac02ddde
  8. 02 12月, 2015 1 次提交
  9. 30 11月, 2015 3 次提交
  10. 20 11月, 2015 1 次提交
  11. 17 11月, 2015 6 次提交
  12. 04 11月, 2015 1 次提交
  13. 29 10月, 2015 1 次提交
    • M
      nvme: LightNVM support · ca064085
      Matias Bjørling 提交于
      The first generation of Open-Channel SSDs is based on NVMe. The NVMe
      driver is extended with support for the LightNVM command set.
      
      Detection is made through PCI IDs. Current supported devices are the
      qemu nvme simulator and CNEX Labs Westlake SSD. The qemu nvme enables
      support through vendor specific bits in the namespace identification and
      the CNEX Labs Westlake SSD implements a LightNVM compatible firmware and
      is detected using the same method as qemu.
      
      After detection, vendor specific codes are used to identify the device
      and enumerate supported features.
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NJavier González <jg@lightnvm.io>
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      ca064085