1. 31 8月, 2015 5 次提交
    • B
      IB/srp: Bump driver version and release date · 713ef24e
      Bart Van Assche 提交于
      Since version 1.0 e.g. scsi-mq has been added. Since this is
      a significant change, bump the driver version and release date.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      713ef24e
    • B
      IB/srp: Handle partial connection success correctly · c257ea6f
      Bart Van Assche 提交于
      Avoid that the following kernel warning is reported if the SRP
      target system accepts fewer channels per connection than what
      was requested by the initiator system:
      
      WARNING: at drivers/infiniband/ulp/srp/ib_srp.c:617 srp_destroy_qp+0xb1/0x120 [ib_srp]()
      Call Trace:
      [<ffffffff8105d67f>] warn_slowpath_common+0x7f/0xc0
      [<ffffffff8105d6da>] warn_slowpath_null+0x1a/0x20
      [<ffffffffa05419e1>] srp_destroy_qp+0xb1/0x120 [ib_srp]
      [<ffffffffa05445fb>] srp_create_ch_ib+0x19b/0x420 [ib_srp]
      [<ffffffffa0545257>] srp_create_target+0x7d7/0xa94 [ib_srp]
      [<ffffffff8138dac0>] dev_attr_store+0x20/0x30
      [<ffffffff812079ef>] sysfs_write_file+0xef/0x170
      [<ffffffff81191fc4>] vfs_write+0xb4/0x130
      [<ffffffff8119276f>] sys_write+0x5f/0xa0
      [<ffffffff815a0a59>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      c257ea6f
    • B
      IB/srp: Constify a function argument · e6300cbd
      Bart Van Assche 提交于
      This patch does not change any functionality.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      e6300cbd
    • S
      IB/srp: Convert to ib_alloc_mr · 563b67c5
      Sagi Grimberg 提交于
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      563b67c5
    • H
      IB/core: lock client data with lists_rwsem · 7c1eb45a
      Haggai Eran 提交于
      An ib_client callback that is called with the lists_rwsem locked only for
      read is protected from changes to the IB client lists, but not from
      ib_unregister_device() freeing its client data. This is because
      ib_unregister_device() will remove the device from the device list with
      lists_rwsem locked for write, but perform the rest of the cleanup,
      including the call to remove() without that lock.
      
      Mark client data that is undergoing de-registration with a new going_down
      flag in the client data context. Lock the client data list with lists_rwsem
      for write in addition to using the spinlock, so that functions calling the
      callback would be able to lock only lists_rwsem for read and let callbacks
      sleep.
      
      Since ib_unregister_client() now marks the client data context, no need for
      remove() to search the context again, so pass the client data directly to
      remove() callbacks.
      Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      7c1eb45a
  2. 15 7月, 2015 2 次提交
  3. 13 6月, 2015 1 次提交
  4. 28 5月, 2015 1 次提交
    • L
      kernel/params: constify struct kernel_param_ops uses · 9c27847d
      Luis R. Rodriguez 提交于
      Most code already uses consts for the struct kernel_param_ops,
      sweep the kernel for the last offending stragglers. Other than
      include/linux/moduleparam.h and kernel/params.c all other changes
      were generated with the following Coccinelle SmPL patch. Merge
      conflicts between trees can be handled with Coccinelle.
      
      In the future git could get Coccinelle merge support to deal with
      patch --> fail --> grammar --> Coccinelle --> new patch conflicts
      automatically for us on patches where the grammar is available and
      the patch is of high confidence. Consider this a feature request.
      
      Test compiled on x86_64 against:
      
      	* allnoconfig
      	* allmodconfig
      	* allyesconfig
      
      @ const_found @
      identifier ops;
      @@
      
      const struct kernel_param_ops ops = {
      };
      
      @ const_not_found depends on !const_found @
      identifier ops;
      @@
      
      -struct kernel_param_ops ops = {
      +const struct kernel_param_ops ops = {
      };
      
      Generated-by: Coccinelle SmPL
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Junio C Hamano <gitster@pobox.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: cocci@systeme.lip6.fr
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9c27847d
  5. 19 5月, 2015 10 次提交
  6. 16 4月, 2015 1 次提交
  7. 16 12月, 2014 1 次提交
  8. 04 12月, 2014 1 次提交
  9. 24 11月, 2014 3 次提交
  10. 12 11月, 2014 10 次提交
  11. 14 8月, 2014 1 次提交
  12. 02 8月, 2014 2 次提交
    • B
      IB/srp: Fix residual handling · e714531a
      Bart Van Assche 提交于
      From Documentation/scsi/scsi_mid_low_api.txt: "resid - an LLD should
      set this signed integer to the requested transfer length (i.e.
      'request_bufflen') less the number of bytes that are actually
      transferred."  This means that resid > 0 in case of an underrun and
      also that resid < 0 in case of an overrun.  Modify the SRP initiator
      code such that it matches this requirement.
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Reviewed-by: NSagi Grimberg <sagig@mellanox.com>
      Reviewed-by: NDavid Dillow <dave@thedillows.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      e714531a
    • B
      IB/srp: Fix deadlock between host removal and multipathd · bcc05910
      Bart Van Assche 提交于
      If scsi_remove_host() is invoked after a SCSI device has been blocked,
      if the fast_io_fail_tmo or dev_loss_tmo work gets scheduled on the
      workqueue executing srp_remove_work() and if an I/O request is
      scheduled after the SCSI device had been blocked by e.g. multipathd
      then the following deadlock can occur:
      
          kworker/6:1     D ffff880831f3c460     0   195      2 0x00000000
          Call Trace:
           [<ffffffff814aafd9>] schedule+0x29/0x70
           [<ffffffff814aa0ef>] schedule_timeout+0x10f/0x2a0
           [<ffffffff8105af6f>] msleep+0x2f/0x40
           [<ffffffff8123b0ae>] __blk_drain_queue+0x4e/0x180
           [<ffffffff8123d2d5>] blk_cleanup_queue+0x225/0x230
           [<ffffffffa0010732>] __scsi_remove_device+0x62/0xe0 [scsi_mod]
           [<ffffffffa000ed2f>] scsi_forget_host+0x6f/0x80 [scsi_mod]
           [<ffffffffa0002eba>] scsi_remove_host+0x7a/0x130 [scsi_mod]
           [<ffffffffa07cf5c5>] srp_remove_work+0x95/0x180 [ib_srp]
           [<ffffffff8106d7aa>] process_one_work+0x1ea/0x6c0
           [<ffffffff8106dd9b>] worker_thread+0x11b/0x3a0
           [<ffffffff810758bd>] kthread+0xed/0x110
           [<ffffffff814b972c>] ret_from_fork+0x7c/0xb0
          multipathd      D ffff880096acc460     0  5340      1 0x00000000
          Call Trace:
           [<ffffffff814aafd9>] schedule+0x29/0x70
           [<ffffffff814aa0ef>] schedule_timeout+0x10f/0x2a0
           [<ffffffff814ab79b>] io_schedule_timeout+0x9b/0xf0
           [<ffffffff814abe1c>] wait_for_completion_io_timeout+0xdc/0x110
           [<ffffffff81244b9b>] blk_execute_rq+0x9b/0x100
           [<ffffffff8124f665>] sg_io+0x1a5/0x450
           [<ffffffff8124fd21>] scsi_cmd_ioctl+0x2a1/0x430
           [<ffffffff8124fef2>] scsi_cmd_blk_ioctl+0x42/0x50
           [<ffffffffa00ec97e>] sd_ioctl+0xbe/0x140 [sd_mod]
           [<ffffffff8124bd04>] blkdev_ioctl+0x234/0x840
           [<ffffffff811cb491>] block_ioctl+0x41/0x50
           [<ffffffff811a0df0>] do_vfs_ioctl+0x300/0x520
           [<ffffffff811a1051>] SyS_ioctl+0x41/0x80
           [<ffffffff814b9962>] tracesys+0xd0/0xd5
      
      Fix this by scheduling removal work on another workqueue than the
      transport layer timers.
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Reviewed-by: NSagi Grimberg <sagig@mellanox.com>
      Reviewed-by: NDavid Dillow <dave@thedillows.org>
      Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      bcc05910
  13. 30 5月, 2014 1 次提交
  14. 21 5月, 2014 1 次提交
    • B
      IB/srp: Add fast registration support · 5cfb1782
      Bart Van Assche 提交于
      Certain HCA types (e.g. Connect-IB) and certain configurations (e.g.
      ConnectX VF) support fast registration but not FMR. Hence add fast
      registration support.
      
      In function srp_rport_reconnect(), move the the srp_finish_req()
      loop from after to before the srp_create_target_ib() call. This is
      needed to avoid that srp_finish_req() tries to queue any
      invalidation requests for rkeys associated with the old queue pair
      on the newly allocated queue pair. Invoking srp_finish_req() before
      the queue pair has been reallocated is safe since srp_claim_req()
      handles completions correctly that arrive after srp_finish_req()
      has been invoked.
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      5cfb1782