1. 09 11月, 2013 5 次提交
  2. 02 7月, 2013 1 次提交
  3. 26 2月, 2013 1 次提交
    • B
      IB/srp: Fail I/O requests if the transport is offline · 2ce19e72
      Bart Van Assche 提交于
      If an SRP target is no longer reachable and srp_reset_host() fails to
      reconnect then ib_srp will invoke scsi_remove_host().  That function
      will invoke __scsi_remove_device() for each LUN.  And that last
      function will change the device state from SDEV_TRANSPORT_OFFLINE into
      SDEV_CANCEL.  Certain user space software, e.g. older versions of
      multipathd, continue queueing I/O to SCSI devices that are in the
      SDEV_CANCEL state.
      
      If these I/O requests are submitted as SG_IO that means that the
      REQ_PREEMPT flag will be set and hence that these requests will be
      passed to srp_queuecommand().  These requests will time out.  If new
      requests are queued fast enough from user space these active requests
      will prevent __scsi_remove_device() to finish.
      
      Avoid this by failing I/O requests in the SDEV_CANCEL state if the
      transport is offline.  Introduce a new variable to keep track of the
      transport state instead of failing requests if (!target->connected ||
      target->qp_in_error), so that the SCSI error handler has a chance to
      retry commands after a transport layer failure occurred.
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Cc: <stable@vger.kernel.org> # 3.8
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      2ce19e72
  4. 01 12月, 2012 5 次提交
  5. 16 3月, 2011 4 次提交
    • D
      IB/srp: try to use larger FMR sizes to cover our mappings · be8b9814
      David Dillow 提交于
      Now that we can get larger SG lists, we can take advantage of HCAs that
      allow us to use larger FMR sizes. In many cases, we can use up to 512
      entries, so start there and work our way down.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      be8b9814
    • D
      IB/srp: add support for indirect tables that don't fit in SRP_CMD · c07d424d
      David Dillow 提交于
      This allows us to guarantee the ability to submit up to 8 MB requests
      based on the current value of SCSI_MAX_SG_CHAIN_SEGMENTS. While FMR will
      usually condense the requests into 8 SG entries, it is imperative that
      the target support external tables in case the FMR mapping fails or is
      not supported.
      
      We add a safety valve to allow targets without the needed support to
      reap the benefits of the large tables, but fail in a manner that lets
      the user know that the data didn't make it to the device. The user must
      add "allow_ext_sg=1" to the target parameters to indicate that the
      target has the needed support.
      
      If indirect_sg_entries is not specified in the modules options, then
      the sg_tablesize for the target will default to cmd_sg_entries unless
      overridden by the target options.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      c07d424d
    • D
      IB/srp: rework mapping engine to use multiple FMR entries · 8f26c9ff
      David Dillow 提交于
      Instead of forcing all of the S/G entries to fit in one FMR, and falling
      back to indirect descriptors if that fails, allow the use of as many
      FMRs as needed to map the request. This lays the groundwork for allowing
      indirect descriptor tables that are larger than can fit in the command
      IU, but should marginally improve performance now by reducing the number
      of indirect descriptors needed.
      
      We increase the minimum page size for the FMR pool to 4K, as larger
      pages help increase the coverage of each FMR, and it is rare that the
      kernel would send down a request with scattered 512 byte fragments.
      
      This patch also move some of the target initialization code afte the
      parsing of options, to keep it together with the new code that needs to
      allocate memory based on the options given.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      8f26c9ff
    • D
      IB/srp: allow sg_tablesize to be set for each target · 49248644
      David Dillow 提交于
      Different configurations of target software allow differing max sizes of
      the command IU. Allowing this to be changed per-target allows all
      targets on an initiator to get an optimal setting.
      
      We deprecate srp_sg_tablesize and replace it with cmd_sg_entries in
      preparation for allowing more indirect descriptors than can fit in the
      IU.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      49248644
  6. 11 1月, 2011 4 次提交
  7. 06 1月, 2011 2 次提交
  8. 23 10月, 2010 2 次提交
  9. 02 3月, 2010 1 次提交
  10. 15 7月, 2008 1 次提交
  11. 20 4月, 2008 2 次提交
  12. 05 2月, 2008 1 次提交
    • D
      IB/srp: Retry stale connections · 9fe4bcf4
      David Dillow 提交于
      When a host just goes away (crash, power loss, etc.) without tearing
      down its IB connections, it can get stale connection errors when it
      tries to reconnect to targets upon rebooting.  Retrying the connection
      a few times will prevent sysadmins from playing the "which disk(s)
      went missing?" game.
      
      This would have made things slightly quicker when tracking down some
      of the recent bugs, but it also helps quite a bit when you've got a
      large number of targets hanging off a wedged server.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      9fe4bcf4
  13. 26 1月, 2008 1 次提交
    • D
      IB/srp: Respect target credit limit · 8cba2077
      David Dillow 提交于
      The current SRP initiator will send requests even if it has no credits
      available.  The results of sending extra requests are vendor specific,
      but on some devices, overrunning credits will cost 85% of peak
      performance -- e.g. 100 MB/s vs 720 MB/s.  Other devices may just drop
      the requests.
      
      This patch will tell the SCSI midlayer to queue requests if there are
      fewer than two credits remaining, and will not issue a task management
      request if there are no credits remaining.  The mid-layer will retry
      the queued command once an outstanding command completes.
      
      The patch also removes the unlikely() in __srp_get_tx_iu(), as it is
      not at all unlikely to hit this limit under heavy load.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      8cba2077
  14. 07 6月, 2007 1 次提交
  15. 07 5月, 2007 1 次提交
  16. 05 2月, 2007 1 次提交
    • I
      IB/srp: Don't wait for response when QP is in error state. · 1033ff67
      Ishai Rabinovitz 提交于
      When there is a call to send_tsk_mgmt SRP posts a send and waits for 5
      seconds to get a response.
      
      When the QP is in the error state it is obvious that there will be no
      response so it is quite useless to wait.  In fact, the timeout causes
      SRP to wait a long time to reconnect when a QP error occurs. (Each
      abort and each reset_device calls send_tsk_mgmt, which waits for the
      timeout).  The following patch solves this problem by identifying the
      failure and returning an immediate error code.
      Signed-off-by: NIshai Rabinovitz <ishai@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      1033ff67
  17. 16 12月, 2006 1 次提交
    • R
      IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G · bf628dc2
      Roland Dreier 提交于
      struct srp_device.fmr_page_mask was unsigned long, which means that
      the top part of addresses above 4G was being chopped off on 32-bit
      architectures.  Of course nothing good happens when data from SRP
      targets is DMAed to the wrong place.
      
      Fix this by changing fmr_page_mask to u64, to match the addresses
      actually used by IB devices.
      
      Thanks to Brian Cain <Brian.Cain@ge.com> and David McMillen
      <davem@systemfabricworks.com> for help diagnosing the bug and testing
      the fix.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      bf628dc2
  18. 13 12月, 2006 1 次提交
  19. 11 10月, 2006 1 次提交
  20. 18 6月, 2006 4 次提交
    • R
      IB/srp: Support SRP rev. 10 targets · 0c0450db
      Ramachandra K 提交于
      There has been a change in the format of port identifiers between
      revision 10 of the SRP specification and the current revision 16A.
      
      Revision 10 specifies port identifier format as
      
        lower 8 bytes :  GUID   upper 8 bytes :  Extension
      
      Whereas revision 16A specifies it as 
      
       lower 8 bytes :  Extension  upper 8 bytes :  GUID
      
      There are older targets (e.g. SilverStorm Virtual Fibre Channel
      Bridge) which conform to revision 10 of the SRP specification.
      
      The I/O class of revision 10 is 0xFF00 and the I/O class of revision
      16A is 0x0100.
      
      For supporting older targets, this patch:
      
      1) Adds a new optional target creation parameter "io_class". Default
         value of io_class is 0x0100 (i.e. revision 16A)
      2) Uses the correct port identifier format for targets with IO class
         of 0xFF00 (i.e. conforming to revision 10)
      Signed-off-by: NRamachandra K <rkuchimanchi@silverstorm.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      0c0450db
    • R
      IB/srp: Get rid of "Target has req_lim 0" messages · 6bfa24fa
      Roland Dreier 提交于
      It's perfectly valid for a connection to an SRP target to have a
      request limit of 0, so get rid of the message about it, which can spam
      kernel logs even with printk_ratelimit().  Keep a count of such events
      in a "zero_req_lim" SCSI host attribute instead, so someone who cares
      can look at the statistics.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      6bfa24fa
    • V
      IB/srp: Allow sg_tablesize to be adjusted · 74b0a15b
      Vu Pham 提交于
      Make the sg_tablesize used by SRP adjustable at module load time via a
      module parameter.  Calculate the corresponding IU length required to
      support this.
      Signed-off-by: NVu Pham <vu@mellanox.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      74b0a15b
    • M
      IB/srp: Change target_mutex to a spinlock · b3589fd4
      Matthew Wilcox 提交于
      The SRP driver never sleeps while holding target_mutex, and it's just
      used to protect some simple list operations, so hold times will be
      short.  So just convert it to a spinlock, which is smaller and faster.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      b3589fd4