1. 13 7月, 2018 2 次提交
  2. 30 3月, 2018 15 次提交
  3. 05 1月, 2018 3 次提交
  4. 11 11月, 2017 1 次提交
  5. 13 10月, 2017 2 次提交
  6. 12 9月, 2017 1 次提交
  7. 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
  8. 27 6月, 2017 1 次提交
  9. 15 6月, 2017 1 次提交
  10. 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
  11. 10 5月, 2017 1 次提交
  12. 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
  13. 04 5月, 2017 1 次提交
  14. 26 4月, 2017 1 次提交
  15. 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
  16. 20 4月, 2017 1 次提交
  17. 17 4月, 2017 4 次提交