1. 20 2月, 2015 1 次提交
    • K
      NVMe: Update SCSI Inquiry VPD 83h translation · 4f1982b4
      Keith Busch 提交于
      The original translation created collisions on Inquiry VPD 83 for many
      existing devices. Newer specifications provide other ways to translate
      based on the device's version can be used to create unique identifiers.
      
      Version 1.1 provides an EUI64 field that uniquely identifies each
      namespace, and 1.2 added the longer NGUID field for the same reason.
      Both follow the IEEE EUI format and readily translate to the SCSI device
      identification EUI designator type 2h. For devices implementing either,
      the translation will use this type, defaulting to the EUI64 8-byte type if
      implemented then NGUID's 16 byte version if not. If neither are provided,
      the 1.0 translation is used, and is updated to use the SCSI String format
      to guarantee a unique identifier.
      
      Knowing when to use the new fields depends on the nvme controller's
      revision. The NVME_VS macro was not decoding this correctly, so that is
      fixed in this patch and moved to a more appropriate place.
      
      Since the Identify Namespace structure required an update for the NGUID
      field, this patch adds the remaining new 1.2 fields to the structure.
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      4f1982b4
  2. 25 11月, 2014 1 次提交
  3. 05 11月, 2014 3 次提交
    • M
      NVMe: Convert to blk-mq · a4aea562
      Matias Bjørling 提交于
      This converts the NVMe driver to a blk-mq request-based driver.
      
      The NVMe driver is currently bio-based and implements queue logic within
      itself.  By using blk-mq, a lot of these responsibilities can be moved
      and simplified.
      
      The patch is divided into the following blocks:
      
       * Per-command data and cmdid have been moved into the struct request
         field. The cmdid_data can be retrieved using blk_mq_rq_to_pdu() and id
         maintenance are now handled by blk-mq through the rq->tag field.
      
       * The logic for splitting bio's has been moved into the blk-mq layer.
         The driver instead notifies the block layer about limited gap support in
         SG lists.
      
       * blk-mq handles timeouts and is reimplemented within nvme_timeout().
         This both includes abort handling and command cancelation.
      
       * Assignment of nvme queues to CPUs are replaced with the blk-mq
         version. The current blk-mq strategy is to assign the number of
         mapped queues and CPUs to provide synergy, while the nvme driver
         assign as many nvme hw queues as possible. This can be implemented in
         blk-mq if needed.
      
       * NVMe queues are merged with the tags structure of blk-mq.
      
       * blk-mq takes care of setup/teardown of nvme queues and guards invalid
         accesses. Therefore, RCU-usage for nvme queues can be removed.
      
       * IO tracing and accounting are handled by blk-mq and therefore removed.
      
       * Queue suspension logic is replaced with the logic from the block
         layer.
      
      Contributions in this patch from:
      
        Sam Bradshaw <sbradshaw@micron.com>
        Jens Axboe <axboe@fb.com>
        Keith Busch <keith.busch@intel.com>
        Robert Nelson <rlnelson@google.com>
      Acked-by: NKeith Busch <keith.busch@intel.com>
      Acked-by: NJens Axboe <axboe@fb.com>
      
      Updated for new ->queue_rq() prototype.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      a4aea562
    • K
      NVMe: Fix SG_IO status values · 695a4fe7
      Keith Busch 提交于
      We've only been setting the sg_io_hdr status values on SCSI commands
      that require an nvme command to complete the translation. The fields
      in the struct are output parameters, so we have to set them, otherwise
      user space will see whatever was in memory from before. In the case of
      compat SG_IO, this would reveal kernel memory. This fixes the issue by
      initializing the sg_io_hdr with successful status.
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Acked-by: NVishal Verma <vishal.l.verma@linux.intel.com>
      Signed-off-by: NMatthew Wilcox <matthew.r.wilcox@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      695a4fe7
    • K
      NVMe: Remove duplicate compat SG_IO code · e179729a
      Keith Busch 提交于
      We can return -ENOIOCTLCMD and the ioctl will be handled by
      fs/compat_ioctl.c instead. This removes a lot of duplicate code in the
      nvme driver.
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NMatthew Wilcox <matthew.r.wilcox@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      e179729a
  4. 14 6月, 2014 1 次提交
  5. 13 6月, 2014 1 次提交
  6. 04 6月, 2014 3 次提交
  7. 05 5月, 2014 1 次提交
  8. 11 4月, 2014 1 次提交
    • K
      NVMe: Retry failed commands with non-fatal errors · edd10d33
      Keith Busch 提交于
      For commands returned with failed status, queue these for resubmission
      and continue retrying them until success or for a limited amount of
      time. The final timeout was arbitrarily chosen so requests can't be
      retried indefinitely.
      
      Since these are requeued on the nvmeq that submitted the command, the
      callbacks have to take an nvmeq instead of an nvme_dev as a parameter
      so that we can use the locked queue to append the iod to retry later.
      
      The nvme_iod conviently can be used to track how long we've been trying
      to successfully complete an iod request. The nvme_iod also provides the
      nvme prp dma mappings, so I had to move a few things around so we can
      keep those mappings.
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      [fixed checkpatch issue with long line]
      Signed-off-by: NMatthew Wilcox <matthew.r.wilcox@intel.com>
      edd10d33
  9. 24 3月, 2014 2 次提交
  10. 17 12月, 2013 1 次提交
  11. 20 6月, 2013 1 次提交
  12. 17 5月, 2013 2 次提交
  13. 08 5月, 2013 1 次提交
  14. 03 5月, 2013 2 次提交
  15. 17 4月, 2013 2 次提交
  16. 29 3月, 2013 1 次提交