1. 30 3月, 2018 11 次提交
  2. 05 1月, 2018 3 次提交
  3. 11 11月, 2017 1 次提交
  4. 13 10月, 2017 2 次提交
  5. 12 9月, 2017 1 次提交
  6. 24 8月, 2017 1 次提交
    • C
      block: replace bi_bdev with a gendisk pointer and partitions index · 74d46992
      Christoph Hellwig 提交于
      This way we don't need a block_device structure to submit I/O.  The
      block_device has different life time rules from the gendisk and
      request_queue and is usually only available when the block device node
      is open.  Other callers need to explicitly create one (e.g. the lightnvm
      passthrough code, or the new nvme multipathing code).
      
      For the actual I/O path all that we need is the gendisk, which exists
      once per block device.  But given that the block layer also does
      partition remapping we additionally need a partition index, which is
      used for said remapping in generic_make_request.
      
      Note that all the block drivers generally want request_queue or
      sometimes the gendisk, so this removes a layer of indirection all
      over the stack.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      74d46992
  7. 27 6月, 2017 1 次提交
  8. 15 6月, 2017 1 次提交
  9. 09 6月, 2017 2 次提交
    • C
      block: introduce new block status code type · 2a842aca
      Christoph Hellwig 提交于
      Currently we use nornal Linux errno values in the block layer, and while
      we accept any error a few have overloaded magic meanings.  This patch
      instead introduces a new  blk_status_t value that holds block layer specific
      status codes and explicitly explains their meaning.  Helpers to convert from
      and to the previous special meanings are provided for now, but I suspect
      we want to get rid of them in the long run - those drivers that have a
      errno input (e.g. networking) usually get errnos that don't know about
      the special block layer overloads, and similarly returning them to userspace
      will usually return somethings that strictly speaking isn't correct
      for file system operations, but that's left as an exercise for later.
      
      For now the set of errors is a very limited set that closely corresponds
      to the previous overloaded errno values, but there is some low hanging
      fruite to improve it.
      
      blk_status_t (ab)uses the sparse __bitwise annotations to allow for sparse
      typechecking, so that we can easily catch places passing the wrong values.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      2a842aca
    • C
      nvme-lightnvm: use blk_execute_rq in nvme_nvm_submit_user_cmd · 40174154
      Christoph Hellwig 提交于
      Instead of reinventing it poorly.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NBart Van Assche <Bart.VanAssche@sandisk.com>
      Reviewed-by: NJavier González <javier@cnexlabs.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      40174154
  10. 10 5月, 2017 1 次提交
  11. 08 5月, 2017 1 次提交
    • G
      lightnvm: remove unused rq parameter of nvme_nvm_rqtocmd() to kill warning · 629b1b2e
      Geert Uytterhoeven 提交于
      With gcc 4.1.2:
      
          drivers/nvme/host/lightnvm.c: In function ‘nvme_nvm_submit_io’:
          drivers/nvme/host/lightnvm.c:498: warning: ‘rq’ is used uninitialized in this function
      
      Indeed, since commit 2e13f33a ("lightnvm: create cmd before
      allocating request"), the request is passed to nvme_nvm_rqtocmd() before
      it is allocated.
      
      Fortunately, as of commit 91276162 ("lightnvm: refactor end_io
      functions for sync"), nvme_nvm_rqtocmd () no longer uses the passed
      request, so this warning is a false positive.
      
      Drop the unused parameter to clean up the code and kill the warning.
      
      Fixes: 2e13f33a ("lightnvm: create cmd before allocating request")
      Fixes: 91276162 ("lightnvm: refactor end_io functions for sync")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      629b1b2e
  12. 04 5月, 2017 1 次提交
  13. 26 4月, 2017 1 次提交
  14. 21 4月, 2017 2 次提交
    • C
      nvme: make nvme_error_status private · 65ba6b54
      Christoph Hellwig 提交于
      Currently it's used by the lighnvm passthrough ioctl, but we'd like to make
      it private in preparation of block layer specific error code.  Lighnvm already
      returns the real NVMe status anyway, so I think we can just limit it to
      returning -EIO for any status set.
      
      This will need a careful audit from the lightnvm folks, though.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      65ba6b54
    • C
      nvme: split nvme status from block req->errors · 27fa9bc5
      Christoph Hellwig 提交于
      We want our own clearly defined error field for NVMe passthrough commands,
      and the request errors field is going away in its current form.
      
      Just store the status and result field in the nvme_request field from
      hardirq completion context (using a new helper) and then generate a
      Linux errno for the block layer only when we actually need it.
      
      Because we can't overload the status value with a negative error code
      for cancelled command we now have a flags filed in struct nvme_request
      that contains a bit for this condition.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      27fa9bc5
  15. 20 4月, 2017 1 次提交
  16. 17 4月, 2017 4 次提交
  17. 31 1月, 2017 4 次提交
  18. 30 11月, 2016 2 次提交
    • J
      lightnvm: eliminate nvm_lun abstraction in mm · 8e53624d
      Javier González 提交于
      In order to naturally support multi-target instances on an Open-Channel
      SSD, targets should own the LUNs they get blocks from and manage
      provisioning internally. This is done in several steps.
      
      Since targets own the LUNs the are instantiated on top of and manage the
      free block list internally, there is no need for a LUN abstraction in
      the media manager. LUNs are intrinsically managed as in the physical
      layout (ch:0,lun:0, ..., ch:0,lun:n, ch:1,lun:0, ch:1,lun:n, ...,
      ch:m,lun:0, ch:m,lun:n) and given to the targets based on the target
      creation ioctl. This simplifies LUN management and clears the path for a
      partition manager to sit directly underneath LightNVM targets.
      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>
      8e53624d
    • J
      lightnvm: move block provisioning to targets · 8e79b5cb
      Javier González 提交于
      In order to naturally support multi-target instances on an Open-Channel
      SSD, targets should own the LUNs they get blocks from and manage
      provisioning internally. This is done in several steps.
      
      This patch moves the block provisioning inside of the target and removes
      the get/put block interface from the media manager.
      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>
      8e79b5cb