1. 07 9月, 2016 1 次提交
  2. 28 8月, 2016 2 次提交
  3. 24 8月, 2016 1 次提交
  4. 19 8月, 2016 3 次提交
  5. 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
  6. 16 8月, 2016 1 次提交
  7. 15 8月, 2016 1 次提交
  8. 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
  9. 04 8月, 2016 2 次提交
  10. 03 8月, 2016 6 次提交
  11. 21 7月, 2016 4 次提交
  12. 14 7月, 2016 3 次提交
  13. 13 7月, 2016 1 次提交
    • K
      nvme: Limit command retries · f80ec966
      Keith Busch 提交于
      Many controller implementations will return errors to commands that will
      not succeed, but without the DNR bit set. The driver previously retried
      these commands an unlimited number of times until the command timeout
      has exceeded, which takes an unnecessarilly long period of time.
      
      This patch limits the number of retries a command can have, defaulting
      to 5, but is user tunable at load or runtime.
      
      The struct request's 'retries' field is used to track the number of
      retries attempted. This is in contrast with scsi's use of this field,
      which indicates how many retries are allowed.
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      f80ec966
  14. 12 7月, 2016 5 次提交
    • M
      nvme-fabrics: add-remove ctrl repeat fix · e76debd9
      Ming Lin 提交于
      Repeatedly adding then removing the same NVMe-over-Fabrics controller
      over and over again (shown below) can cause a kernel crash (also shown
      below).  This patch fixes that.
      
      [nvmf]# ./setup_nvme_connections.sh
      traddr=192.168.1.100,transport=rdma,trsvcid=4420,nqn=darkside
      -nqn,hostnqn=evil-wins-nqn,nr_io_queues=16 > /dev/nvme-fabrics
      traddr=192.168.1.100,transport=rdma,trsvcid=4420,nqn=lightside
      -nqn,hostnqn=good-wins-nqn > /dev/nvme-fabrics
      [nvmf]# ./remove_nvme_connections.sh 2
      echo 1 > /sys/class/nvme/nvme0/delete_controller
      echo 1 > /sys/class/nvme/nvme1/delete_controller
      [nvmf]# ./setup_nvme_connections.sh
      traddr=192.168.1.100,transport=rdma,trsvcid=4420,nqn=darkside
      -nqn,hostnqn=evil-wins-nqn,nr_io_queues=16 > /dev/nvme-fabrics
      Killed
      
      [nvmf]# dmesg
      [  313.416908] nvme nvme0: creating 16 I/O queues.
      [  313.523908] nvme nvme0: new ctrl: NQN "darkside-nqn", addr
      192.168.1.100:4420
      [  313.524857] BUG: unable to handle kernel NULL pointer dereference at
      0000000000000010
      [  313.525262] IP: [<ffffffff8136c60e>] strcmp+0xe/0x30
      [  313.525490] PGD 0
      [  313.525726] Oops: 0000 [#1] SMP
      [  313.525900] Modules linked in: nvme_rdma nvme_fabrics nvme_core
      ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx4_en
      mlx4_ib ib_core mlx4_core
      [  313.527085] CPU: 15 PID: 5856 Comm: setup_nvme_conn Not tainted
      4.7.0-rc2+ #2
      [  313.527259] Hardware name: Supermicro X9DRT-F/IBQF/IBFF/X9DRT
      -F/IBQF/IBFF, BIOS 1.0a 10/09/2012
      [  313.527551] task: ffff88027646cd40 ti: ffff88025b980000 task.ti:
      ffff88025b980000
      [  313.527879] RIP: 0010:[<ffffffff8136c60e>]  [<ffffffff8136c60e>]
      strcmp+0xe/0x30
      [  313.528232] RSP: 0018:ffff88025b983db0  EFLAGS: 00010206
      [  313.528403] RAX: 0000000000000000 RBX: ffff880471879880 RCX:
      fffffffffffffff1
      [  313.528594] RDX: 0000000000000000 RSI: ffff880474afa860 RDI:
      0000000000000011
      [  313.528778] RBP: ffff88025b983db0 R08: ffff880474afa860 R09:
      ffff880471879058
      [  313.528956] R10: 000000000000002c R11: ffff88047f415000 R12:
      ffff880471879800
      [  313.529129] R13: ffff880471879000 R14: ffff880474afa860 R15:
      fffffffffffffff8
      [  313.529303] FS:  00007f778f510700(0000) GS:ffff88047fbc0000(0000)
      knlGS:0000000000000000
      [  313.529629] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  313.529817] CR2: 0000000000000010 CR3: 0000000274174000 CR4:
      00000000000406e0
      [  313.529989] Stack:
      [  313.530154]  ffff88025b983e48 ffffffffa0171c74 0000000000000001
      0000000000000059
      [  313.530621]  ffff880476f32400 ffff88047e8add80 0000010074b33aa0
      ffff880471879059
      [  313.531162]  ffff88047187904b ffff880471879058 0000000000000000
      ffff88047736e000
      [  313.531629] Call Trace:
      [  313.531797]  [<ffffffffa0171c74>] nvmf_dev_write+0x674/0x840
      [nvme_fabrics]
      [  313.531974]  [<ffffffff81180b53>] __vfs_write+0x23/0x120
      [  313.532146]  [<ffffffff8119daff>] ? __fd_install+0x1f/0xc0
      [  313.532316]  [<ffffffff8119d97a>] ? __alloc_fd+0x3a/0x170
      [  313.532487]  [<ffffffff811811f3>] vfs_write+0xb3/0x1b0
      [  313.532658]  [<ffffffff8117e321>] ? filp_close+0x51/0x70
      [  313.532845]  [<ffffffff811824e1>] SyS_write+0x41/0xa0
      [  313.533016]  [<ffffffff8183055b>]
      entry_SYSCALL_64_fastpath+0x13/0x8f
      [  313.533188] Code: 80 3a 00 75 f7 48 83 c6 01 0f b6 4e ff 48 83 c2 01
      84 c9 88 4a ff 75 ed 5d c3 0f 1f 00 55 48 89 e5 eb 04 84 c0 74 18 48 83
      c7 01 <0f> b6 47 ff 48 83 c6 01 3a 46 ff 74 eb 19 c0 83 c8 01 5d c3 31
      [  313.536563] RIP  [<ffffffff8136c60e>] strcmp+0xe/0x30
      [  313.536815]  RSP <ffff88025b983db0>
      [  313.536981] CR2: 0000000000000010
      [  313.537151] ---[ end trace 3d952e590e7bc2d5 ]---
      Reported-and-tested-by: NJay Freyensee <james.p.freyensee@intel.com>
      Signed-off-by: NMing Lin <mlin@kernel.org>
      Signed-off-by: NJay Freyensee <james.p.freyensee@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      e76debd9
    • S
      nvme-fabrics: Remove tl_retry_count · 6a92967c
      Sagi Grimberg 提交于
      The timeout before error recovery logic kicks in is
      dictated by the nvme keep-alive, so we don't really need
      a transport layer retry count. transports can retry for
      as much as they like.
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      6a92967c
    • S
      nvme-rdma: Don't use tl_retry_count · 2ac17c28
      Sagi Grimberg 提交于
      Always use the maximum qp retry count as the
      error recovery timeout is dictated from the nvme
      keep-alive.
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      2ac17c28
    • W
      nvme-rdma: fix the return value of nvme_rdma_reinit_request() · 458a9632
      Wei Yongjun 提交于
      PTR_ERR should be applied before its argument is reassigned, otherwise the
      return value will be set to 0, not error code.
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Reviewed-by: NJay Freyensee <james_p_freyensee@linux.intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      458a9632
    • G
      nvme/quirk: Add a delay before checking for adapter readiness · 54adc010
      Guilherme G. Piccoli 提交于
      When disabling the controller, the specification says the register
      NVME_REG_CC should be written and then driver needs to wait the
      adapter to be ready, which is checked by reading another register
      bit (NVME_CSTS_RDY). There's a timeout validation in this checking,
      so in case this timeout is reached the driver gives up and removes
      the adapter from the system.
      
      After a firmware activation procedure, the PCI_DEVICE(0x1c58, 0x0003)
      (HGST adapter) end up being removed if we issue a reset_controller,
      because driver keeps verifying the NVME_REG_CSTS until the timeout is
      reached. This patch adds a necessary quirk for this adapter, by
      introducing a delay before nvme_wait_ready(), so the reset procedure
      is able to be completed. This quirk is needed because just increasing
      the timeout is not enough in case of this adapter - the driver must
      wait before start reading NVME_REG_CSTS register on this specific
      device.
      Signed-off-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      54adc010
  15. 08 7月, 2016 2 次提交
  16. 07 7月, 2016 1 次提交
  17. 06 7月, 2016 4 次提交