1. 14 11月, 2017 1 次提交
  2. 18 10月, 2017 4 次提交
  3. 25 8月, 2017 1 次提交
  4. 07 7月, 2017 1 次提交
  5. 08 5月, 2017 2 次提交
    • B
      IB/srpt: Avoid that aborting a command triggers a kernel warning · bd2c52d7
      Bart Van Assche 提交于
      Avoid that the following warning is triggered:
      
      WARNING: CPU: 10 PID: 166 at ../drivers/infiniband/ulp/srpt/ib_srpt.c:2674 srpt_release_cmd+0x139/0x140 [ib_srpt]
      CPU: 10 PID: 166 Comm: kworker/u24:8 Not tainted 4.9.4-1-default #1
      Workqueue: tmr-fileio target_tmr_work [target_core_mod]
      Call Trace:
       [<ffffffffaa3c4f70>] dump_stack+0x63/0x83
       [<ffffffffaa0844eb>] __warn+0xcb/0xf0
       [<ffffffffaa0845dd>] warn_slowpath_null+0x1d/0x20
       [<ffffffffc06ba429>] srpt_release_cmd+0x139/0x140 [ib_srpt]
       [<ffffffffc06e4377>] target_release_cmd_kref+0xb7/0x120 [target_core_mod]
       [<ffffffffc06e4d7f>] target_put_sess_cmd+0x2f/0x60 [target_core_mod]
       [<ffffffffc06e15e0>] core_tmr_lun_reset+0x340/0x790 [target_core_mod]
       [<ffffffffc06e4816>] target_tmr_work+0xe6/0x140 [target_core_mod]
       [<ffffffffaa09e4d3>] process_one_work+0x1f3/0x4d0
       [<ffffffffaa09e7f8>] worker_thread+0x48/0x4e0
       [<ffffffffaa09e7b0>] ? process_one_work+0x4d0/0x4d0
       [<ffffffffaa0a46da>] kthread+0xca/0xe0
       [<ffffffffaa0a4610>] ? kthread_park+0x60/0x60
       [<ffffffffaa71b775>] ret_from_fork+0x25/0x30
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: David Disseldorp <ddiss@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bd2c52d7
    • B
      IB/srpt: Fix abort handling · 55d69427
      Bart Van Assche 提交于
      Let the target core check the CMD_T_ABORTED flag instead of the SRP
      target driver. Hence remove the transport_check_aborted_status()
      call. Since state == SRPT_STATE_CMD_RSP_SENT is something that really
      should not happen, do not try to recover if srpt_queue_response() is
      called for an I/O context that is in that state. This patch is a bug
      fix because the srpt_abort_cmd() call is misplaced - if that function
      is called from srpt_queue_response() it should either be called
      before the command state is changed or after the response has been
      sent.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: David Disseldorp <ddiss@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      55d69427
  6. 02 5月, 2017 1 次提交
  7. 28 1月, 2017 1 次提交
  8. 25 1月, 2017 2 次提交
  9. 15 12月, 2016 1 次提交
  10. 24 9月, 2016 1 次提交
  11. 25 8月, 2016 1 次提交
    • D
      IB/srpt: Update sport->port_guid with each port refresh · 716b076b
      Doug Ledford 提交于
      If port_guid is set with the default subnet_prefix, then we get a change
      event and run a port refresh, we don't update the port_guid.  As a
      result, attempts to create a target device that uses the new
      subnet_prefix in the wwn will fail to find a match and be rejected by
      the ib_srpt driver.  This makes it impossible to configure a port if it
      was initialized with a default subnet_prefix and later changed to any
      non-default subnet-prefix.  Updating the port refresh task to always
      update the wwn based upon the current subnext_prefix solves this
      problem.
      
      Cc: Bart Van Assche <bart.vanassche@sandisk.com>
      Cc: nab@linux-iscsi.org
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      716b076b
  12. 03 8月, 2016 2 次提交
  13. 24 6月, 2016 1 次提交
    • B
      IB/srpt: Reduce QP buffer size · c0cf4512
      Bart Van Assche 提交于
      The memory needed for the send and receive queues associated with
      a QP is proportional to the max_sge parameter. The current value
      of that parameter is such that with an mlx4 HCA the QP buffer size
      is 8 MB. Since DMA is used for communication between HCA and CPU
      that buffer either has to be allocated coherently or map_single()
      must succeed for that buffer. Since large contiguous allocations
      are fragile and since the maximum segment size for e.g. swiotlb
      is 256 KB, reduce the max_sge parameter. This patch avoids that
      the following text appears on the console after SRP logout and
      relogin on a system equipped with multiple IB HCAs:
      
      mlx4_core 0000:05:00.0: swiotlb buffer is full (sz: 8388608 bytes)
      swiotlb: coherent allocation failed for device 0000:05:00.0 size=8388608
      CPU: 11 PID: 148 Comm: kworker/11:1 Not tainted 4.7.0-rc4-dbg+ #1
      Call Trace:
       [<ffffffff812c6d35>] dump_stack+0x67/0x92
       [<ffffffff812efe71>] swiotlb_alloc_coherent+0x141/0x150
       [<ffffffff810458be>] x86_swiotlb_alloc_coherent+0x3e/0x50
       [<ffffffffa03861fa>] mlx4_buf_direct_alloc.isra.5+0x9a/0x120 [mlx4_core]
       [<ffffffffa0386545>] mlx4_buf_alloc+0x165/0x1a0 [mlx4_core]
       [<ffffffffa035053d>] create_qp_common.isra.29+0x57d/0xff0 [mlx4_ib]
       [<ffffffffa03510da>] mlx4_ib_create_qp+0x12a/0x3f0 [mlx4_ib]
       [<ffffffffa031154a>] ib_create_qp+0x3a/0x250 [ib_core]
       [<ffffffffa055dd4b>] srpt_cm_handler+0x4bb/0xcad [ib_srpt]
       [<ffffffffa02c1ab0>] cm_process_work+0x20/0xf0 [ib_cm]
       [<ffffffffa02c3640>] cm_work_handler+0x1ac0/0x2059 [ib_cm]
       [<ffffffff810737ed>] process_one_work+0x19d/0x490
       [<ffffffff81073b29>] worker_thread+0x49/0x490
       [<ffffffff8107a0ea>] kthread+0xea/0x100
       [<ffffffff815b25af>] ret_from_fork+0x1f/0x40
      
      Fixes: b99f8e4d ("IB/srpt: convert to the generic RDMA READ/WRITE API")
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Laurence Oberman <loberman@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      c0cf4512
  14. 26 5月, 2016 1 次提交
  15. 14 5月, 2016 1 次提交
    • C
      IB/srpt: convert to the generic RDMA READ/WRITE API · b99f8e4d
      Christoph Hellwig 提交于
      Replace the homegrown RDMA READ/WRITE code in srpt with the generic API.
      The only real twist here is that we need to allocate one Linux scatterlist
      per direct buffer in the SRP command, and chain them before handing them
      off to the target core.
      
      As a side-effect of the conversion the driver will also chain the SEND
      of the SRP response to the RDMA WRITE WRs for a DATA OUT command, and
      properly account for RDMA WRITE WRs instead of just for RDMA READ WRs
      like the driver previously did.
      
      We now allocate half of the SQ size to RDMA READ/WRITE contexts, assuming
      by default one RDMA READ or WRITE operation per command.  If a command
      has multiple operations it will eat into the budget but will still succeed,
      possible after waiting for WQEs to be available.
      
      Also ensure the QPs request the maximum allowed SGEs so that RDMA R/W API
      works correctly.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      b99f8e4d
  16. 10 5月, 2016 1 次提交
    • C
      target: make ->shutdown_session optional · 22d11759
      Christoph Hellwig 提交于
      Turns out the template and thus many drivers got the return value wrong:
      0 means the fabrics driver needs to put a session reference, which no
      driver except for the iSCSI target drivers did.  Fortunately none of these
      drivers supports explicit Node ACLs, so the bug was harmless.
      
      Even without that only qla2xxx and iscsi every did real work in
      shutdown_session, so get rid of the boilerplate code in all other
      drivers.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      22d11759
  17. 08 4月, 2016 1 次提交
    • B
      Revert "ib_srpt: Convert to percpu_ida tag allocation" · 3c968887
      Bart Van Assche 提交于
      This reverts commit 0fd10721.
      
      That patch causes the ib_srpt driver to crash as soon as the first SCSI
      command is received:
      
        kernel BUG at drivers/infiniband/ulp/srpt/ib_srpt.c:1439!
        invalid opcode: 0000 [#1] SMP
        Workqueue: target_completion target_complete_ok_work [target_core_mod]
        RIP: srpt_queue_response+0x437/0x4a0 [ib_srpt]
        Call Trace:
          srpt_queue_data_in+0x9/0x10 [ib_srpt]
          target_complete_ok_work+0x152/0x2b0 [target_core_mod]
          process_one_work+0x197/0x480
          worker_thread+0x49/0x490
          kthread+0xea/0x100
          ret_from_fork+0x22/0x40
      
      Aside from the crash, the shortcomings of that patch are as follows:
      
       - It makes the ib_srpt driver use I/O contexts allocated by
         transport_alloc_session_tags() but it does not initialize these I/O
         contexts properly.  All the initializations performed by
         srpt_alloc_ioctx() are skipped.
      
       - It swaps the order of the send ioctx allocation and the transition to
         RTR mode which is wrong.
      
       - The amount of memory that is needed for I/O contexts is doubled.
      
       - srpt_rdma_ch.free_list is no longer used but is not removed.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3c968887
  18. 22 3月, 2016 1 次提交
  19. 11 3月, 2016 2 次提交
  20. 01 3月, 2016 14 次提交