1. 03 11月, 2016 2 次提交
  2. 28 10月, 2016 1 次提交
  3. 12 10月, 2016 1 次提交
  4. 25 9月, 2016 2 次提交
  5. 24 9月, 2016 5 次提交
  6. 23 9月, 2016 1 次提交
  7. 21 9月, 2016 3 次提交
    • S
      lightnvm: expose device geometry through sysfs · 40267efd
      Simon A. F. Lund 提交于
      For a host to access an Open-Channel SSD, it has to know its geometry,
      so that it writes and reads at the appropriate device bounds.
      
      Currently, the geometry information is kept within the kernel, and not
      exported to user-space for consumption. This patch exposes the
      configuration through sysfs and enables user-space libraries, such as
      liblightnvm, to use the sysfs implementation to get the geometry of an
      Open-Channel SSD.
      
      The sysfs entries are stored within the device hierarchy, and can be
      found using the "lightnvm" device type.
      
      An example configuration looks like this:
      
      /sys/class/nvme/
      └── nvme0n1
         ├── capabilities: 3
         ├── device_mode: 1
         ├── erase_max: 1000000
         ├── erase_typ: 1000000
         ├── flash_media_type: 0
         ├── media_capabilities: 0x00000001
         ├── media_type: 0
         ├── multiplane: 0x00010101
         ├── num_blocks: 1022
         ├── num_channels: 1
         ├── num_luns: 4
         ├── num_pages: 64
         ├── num_planes: 1
         ├── page_size: 4096
         ├── prog_max: 100000
         ├── prog_typ: 100000
         ├── read_max: 10000
         ├── read_typ: 10000
         ├── sector_oob_size: 0
         ├── sector_size: 4096
         ├── media_manager: gennvm
         ├── ppa_format: 0x380830082808001010102008
         ├── vendor_opcode: 0
         ├── max_phys_secs: 64
         └── version: 1
      Signed-off-by: NSimon A. F. Lund <slund@cnexlabs.com>
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      40267efd
    • M
      lightnvm: control life of nvm_dev in driver · b0b4e09c
      Matias Bjørling 提交于
      LightNVM compatible device drivers does not have a method to expose
      LightNVM specific sysfs entries.
      
      To enable LightNVM sysfs entries to be exposed, lightnvm device
      drivers require a struct device to attach it to. To allow both the
      actual device driver and lightnvm sysfs entries to coexist, the device
      driver tracks the lifetime of the nvm_dev structure.
      
      This patch refactors NVMe and null_blk to handle the lifetime of struct
      nvm_dev, which eliminates the need for struct gendisk when a lightnvm
      compatible device is provided.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      b0b4e09c
    • M
      nvme: refactor namespaces to support non-gendisk devices · ac81bfa9
      Matias Bjørling 提交于
      With LightNVM enabled namespaces, the gendisk structure is not exposed
      to the user. This prevents LightNVM users from accessing the NVMe device
      driver specific sysfs entries, and LightNVM namespace geometry.
      
      Refactor the revalidation process, so that a namespace, instead of a
      gendisk, is revalidated. This later allows patches to wire up the
      sysfs entries up to a non-gendisk namespace.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      ac81bfa9
  8. 15 9月, 2016 3 次提交
  9. 13 9月, 2016 4 次提交
    • A
      nvme-rdma: add back dependency on CONFIG_BLOCK · 2cfe199c
      Arnd Bergmann 提交于
      A recent change removed the dependency on BLK_DEV_NVME, which implies
      the dependency on PCI and BLOCK. We don't need CONFIG_PCI, but without
      CONFIG_BLOCK we get tons of build errors, e.g.
      
      In file included from drivers/nvme/host/core.c:16:0:
      linux/blk-mq.h:182:33: error: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
      drivers/nvme/host/core.c: In function 'nvme_setup_rw':
      drivers/nvme/host/core.c:295:21: error: implicit declaration of function 'rq_data_dir' [-Werror=implicit-function-declaration]
      drivers/nvme/host/nvme.h: In function 'nvme_map_len':
      drivers/nvme/host/nvme.h:217:6: error: implicit declaration of function 'req_op' [-Werror=implicit-function-declaration]
      drivers/nvme/host/scsi.c: In function 'nvme_trans_bdev_limits_page':
      drivers/nvme/host/scsi.c:768:85: error: implicit declaration of function 'queue_max_hw_sectors' [-Werror=implicit-function-declaration]
      
      This adds back the specific CONFIG_BLOCK dependency to avoid broken
      configurations.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: aa719874 ("nvme: fabrics drivers don't need the nvme-pci driver")
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      2cfe199c
    • C
      nvme-rdma: fix null pointer dereference on req->mr · 1bda18de
      Colin Ian King 提交于
      If there is an error on req->mr, req->mr is set to null, however
      the following statement sets req->mr->need_inval causing a null
      pointer dereference.  Fix this by bailing out to label 'out' to
      immediately return and hence skip over the offending null pointer
      dereference.
      
      Fixes: f5b7b559 ("nvme-rdma: Get rid of duplicate variable")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      1bda18de
    • S
      nvme-rdma: use ib_client API to detect device removal · e87a911f
      Steve Wise 提交于
      Change nvme-rdma to use the IB Client API to detect device removal.
      This has the wonderful benefit of being able to blow away all the
      ib/rdma_cm resources for the device being removed.  No craziness about
      not destroying the cm_id handling the event.  No deadlocks due to broken
      iw_cm/rdma_cm/iwarp dependencies.  And no need to have a bound cm_id
      around during controller recovery/reconnect to catch device removal
      events.
      
      We don't use the device_add aspect of the ib_client service since we only
      want to create resources for an IB device if we have a target utilizing
      that device.
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      e87a911f
    • S
      nvme-rdma: add DELETING queue flag · e89ca58f
      Sagi Grimberg 提交于
      When we get a surprise disconnect from the target we queue a periodic
      reconnect (which is the sane thing to do...).
      
      We only move the queues out of CONNECTED when we retry to reconnect (after
      10 seconds in the default case) but we stop the blk queues immediately
      so we are not bothered with traffic from now on. If delete() is kicking
      off in this period the queues are still in CONNECTED state.
      
      Part of the delete sequence is trying to issue ctrl shutdown if the
      admin queue is CONNECTED (which it is!). This request is issued but
      stuck in blk-mq waiting for the queues to start again. This might be
      the one preventing us from forward progress...
      
      The patch separates the queue flags to CONNECTED and DELETING. Now we
      will move out of CONNECTED as soon as error recovery kicks in (before
      stopping the queues) and DELETING is on when we start the queue deletion.
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      e89ca58f
  10. 12 9月, 2016 1 次提交
    • L
      nvme: make NVME_RDMA depend on BLOCK · bd0b841f
      Linus Torvalds 提交于
      Commit aa719874 ("nvme: fabrics drivers don't need the nvme-pci
      driver") removed the dependency on BLK_DEV_NVME, but the cdoe does
      depend on the block layer (which used to be an implicit dependency
      through BLK_DEV_NVME).
      
      Otherwise you get various errors from the kbuild test robot random
      config testing when that happens to hit a configuration with BLOCK
      device support disabled.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jay Freyensee <james_p_freyensee@linux.intel.com>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bd0b841f
  11. 09 9月, 2016 1 次提交
  12. 07 9月, 2016 1 次提交
  13. 04 9月, 2016 2 次提交
  14. 28 8月, 2016 2 次提交
  15. 24 8月, 2016 1 次提交
  16. 19 8月, 2016 3 次提交
  17. 18 8月, 2016 2 次提交
    • J
      nvme-rdma: fix sqsize/hsqsize per spec · c5af8654
      Jay Freyensee 提交于
      Per NVMe-over-Fabrics 1.0 spec, sqsize is represented as
      a 0-based value.
      
      Also per spec, the RDMA binding values shall be set
      to sqsize, which makes hsqsize 0-based values.
      
      Thus, the sqsize during NVMf connect() is now:
      
      [root@fedora23-fabrics-host1 for-48]# dmesg
      [  318.720645] nvme_fabrics: nvmf_connect_admin_queue(): sqsize for
      admin queue: 31
      [  318.720884] nvme nvme0: creating 16 I/O queues.
      [  318.810114] nvme_fabrics: nvmf_connect_io_queue(): sqsize for i/o
      queue: 127
      
      Finally, current interpretation implies hrqsize is 1's based
      so set it appropriately.
      Reported-by: NDaniel Verkamp <daniel.verkamp@intel.com>
      Signed-off-by: NJay Freyensee <james_p_freyensee@linux.intel.com>
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      c5af8654
    • J
      fabrics: define admin sqsize min default, per spec · f994d9dc
      Jay Freyensee 提交于
      Upon admin queue connect(), the rdma qp was being
      set based on NVMF_AQ_DEPTH.  However, the fabrics layer was
      using the sqsize field value set for I/O queues for the admin
      queue, which threw the nvme layer and rdma layer off-whack:
      
      root@fedora23-fabrics-host1 nvmf]# dmesg
      [ 3507.798642] nvme_fabrics: nvmf_connect_admin_queue():admin sqsize
      being sent is: 128
      [ 3507.798858] nvme nvme0: creating 16 I/O queues.
      [ 3507.896407] nvme nvme0: new ctrl: NQN "nullside-nqn", addr
      192.168.1.3:4420
      
      Thus, to have a different admin queue value, we use
      NVMF_AQ_DEPTH for connect() and RDMA private data
      as the minimum depth specified in the NVMe-over-Fabrics 1.0 spec
      (and in that RDMA private data we treat hrqsize as 1's-based
      value, per current understanding of the fabrics spec).
      Reported-by: NDaniel Verkamp <daniel.verkamp@intel.com>
      Signed-off-by: NJay Freyensee <james_p_freyensee@linux.intel.com>
      Reviewed-by: NDaniel Verkamp <daniel.verkamp@intel.com>
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      f994d9dc
  18. 16 8月, 2016 1 次提交
  19. 15 8月, 2016 1 次提交
  20. 11 8月, 2016 1 次提交
    • G
      nvme: Suspend all queues before deletion · c21377f8
      Gabriel Krisman Bertazi 提交于
      When nvme_delete_queue fails in the first pass of the
      nvme_disable_io_queues() loop, we return early, failing to suspend all
      of the IO queues.  Later, on the nvme_pci_disable path, this causes us
      to disable MSI without actually having freed all the IRQs, which
      triggers the BUG_ON in free_msi_irqs(), as show below.
      
      This patch refactors nvme_disable_io_queues to suspend all queues before
      start submitting delete queue commands.  This way, we ensure that we
      have at least returned every IRQ before continuing with the removal
      path.
      
      [  487.529200] kernel BUG at ../drivers/pci/msi.c:368!
      cpu 0x46: Vector: 700 (Program Check) at [c0000078c5b83650]
          pc: c000000000627a50: free_msi_irqs+0x90/0x200
          lr: c000000000627a40: free_msi_irqs+0x80/0x200
          sp: c0000078c5b838d0
         msr: 9000000100029033
        current = 0xc0000078c5b40000
        paca    = 0xc000000002bd7600   softe: 0        irq_happened: 0x01
          pid   = 1376, comm = kworker/70:1H
      kernel BUG at ../drivers/pci/msi.c:368!
      Linux version 4.7.0.mainline+ (root@iod76) (gcc version 5.3.1 20160413
      (Ubuntu/IBM 5.3.1-14ubuntu2.1) ) #104 SMP Fri Jul 29 09:20:17 CDT 2016
      enter ? for help
      [c0000078c5b83920] d0000000363b0cd8 nvme_dev_disable+0x208/0x4f0 [nvme]
      [c0000078c5b83a10] d0000000363b12a4 nvme_timeout+0xe4/0x250 [nvme]
      [c0000078c5b83ad0] c0000000005690e4 blk_mq_rq_timed_out+0x64/0x110
      [c0000078c5b83b40] c00000000056c930 bt_for_each+0x160/0x170
      [c0000078c5b83bb0] c00000000056d928 blk_mq_queue_tag_busy_iter+0x78/0x110
      [c0000078c5b83c00] c0000000005675d8 blk_mq_timeout_work+0xd8/0x1b0
      [c0000078c5b83c50] c0000000000e8cf0 process_one_work+0x1e0/0x590
      [c0000078c5b83ce0] c0000000000e9148 worker_thread+0xa8/0x660
      [c0000078c5b83d80] c0000000000f2090 kthread+0x110/0x130
      [c0000078c5b83e30] c0000000000095f0 ret_from_kernel_thread+0x5c/0x6c
      Signed-off-by: NGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
      Cc: Brian King <brking@linux.vnet.ibm.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: linux-nvme@lists.infradead.org
      Signed-off-by: NJens Axboe <axboe@fb.com>
      c21377f8
  21. 04 8月, 2016 2 次提交