1. 19 2月, 2012 4 次提交
    • V
      [SCSI] scsi_transport_iscsi: added support for host event · a11e2545
      Vikas Chaudhary 提交于
      Added support to post kernel host event to application using
      netlink interface.
      Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      a11e2545
    • M
      [SCSI] iscsi: fix setting of pid from netlink skb · df1c7bab
      Mike Christie 提交于
      NETLINK_CREDS's pid now returns 0, so I guess we are supposed to
      be using NETLINK_CB. This changed while the patch to export the
      pid was getting merged upstream, so it was not noticed until both
      the network and iscsi changes were in the same tree.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      df1c7bab
    • S
      [SCSI] iscsi: don't hang in endless loop if no targets present · 46a7c17d
      Sasha Levin 提交于
      iscsi_if_send_reply() may return -ESRCH if there were no targets to send
      data to. Currently we're ignoring this value and looping in attempt to do it
      over and over, which will usually lead in a hung task like this one:
      
      [ 4920.817298] INFO: task trinity:9074 blocked for more than 120 seconds.
      [ 4920.818527] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      [ 4920.819982] trinity         D 0000000000000000  5504  9074   2756 0x00000004
      [ 4920.825374]  ffff880003961a98 0000000000000086 ffff8800001aa000 ffff8800001aa000
      [ 4920.826791]  00000000001d4340 ffff880003961fd8 ffff880003960000 00000000001d4340
      [ 4920.828241]  00000000001d4340 00000000001d4340 ffff880003961fd8 00000000001d4340
      [ 4920.833231]
      [ 4920.833519] Call Trace:
      [ 4920.834010]  [<ffffffff826363fa>] schedule+0x3a/0x50
      [ 4920.834953]  [<ffffffff82634ac9>] __mutex_lock_common+0x209/0x5b0
      [ 4920.836226]  [<ffffffff81af805d>] ? iscsi_if_rx+0x2d/0x990
      [ 4920.837281]  [<ffffffff81053943>] ? sched_clock+0x13/0x20
      [ 4920.838305]  [<ffffffff81af805d>] ? iscsi_if_rx+0x2d/0x990
      [ 4920.839336]  [<ffffffff82634eb0>] mutex_lock_nested+0x40/0x50
      [ 4920.840423]  [<ffffffff81af805d>] iscsi_if_rx+0x2d/0x990
      [ 4920.841434]  [<ffffffff810dffed>] ? sub_preempt_count+0x9d/0xd0
      [ 4920.842548]  [<ffffffff82637bb0>] ? _raw_read_unlock+0x30/0x60
      [ 4920.843666]  [<ffffffff821f71de>] netlink_unicast+0x1ae/0x1f0
      [ 4920.844751]  [<ffffffff821f7997>] netlink_sendmsg+0x227/0x350
      [ 4920.845850]  [<ffffffff821857bd>] ? sock_update_netprioidx+0xdd/0x1b0
      [ 4920.847060]  [<ffffffff82185732>] ? sock_update_netprioidx+0x52/0x1b0
      [ 4920.848276]  [<ffffffff8217f226>] sock_aio_write+0x166/0x180
      [ 4920.849348]  [<ffffffff810dfe41>] ? get_parent_ip+0x11/0x50
      [ 4920.850428]  [<ffffffff811d0d9a>] do_sync_write+0xda/0x120
      [ 4920.851465]  [<ffffffff810dffed>] ? sub_preempt_count+0x9d/0xd0
      [ 4920.852579]  [<ffffffff810dfe41>] ? get_parent_ip+0x11/0x50
      [ 4920.853608]  [<ffffffff81791887>] ? security_file_permission+0x27/0xb0
      [ 4920.854821]  [<ffffffff811d0f4c>] vfs_write+0x16c/0x180
      [ 4920.855781]  [<ffffffff811d104f>] sys_write+0x4f/0xa0
      [ 4920.856798]  [<ffffffff82638e79>] system_call_fastpath+0x16/0x1b
      [ 4920.877487] 1 lock held by trinity/9074:
      [ 4920.878239]  #0:  (rx_queue_mutex){+.+...}, at: [<ffffffff81af805d>] iscsi_if_rx+0x2d/0x990
      [ 4920.880005] Kernel panic - not syncing: hung_task: blocked tasks
      Signed-off-by: NSasha Levin <levinsasha928@gmail.com>
      Acked-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      46a7c17d
    • V
      [SCSI] scsi_transport_iscsi: Added support to show port_state and port_speed in sysfs · aeddde29
      Vikas Chaudhary 提交于
      sysfs patch to view port_state:
          /sys/class/iscsi_host/host*/port_state
      
      sysfs patch to view port_speed:
          /sys/class/iscsi_host/host*/port_speed
      Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      aeddde29
  2. 04 1月, 2012 1 次提交
  3. 15 12月, 2011 1 次提交
    • M
      [SCSI] iscsi class: export pid of process that created · 0c70d84b
      Mike Christie 提交于
      There could be multiple userspace entities creating/destroying/
      recoverying sessions and also the kernel's iscsi drivers could
      be doing this too. If the userspace apps do try to manage the kernel
      ones it can get the driver/fw out of sync and cause the user to
      loose the root disk, oopses or ping ponging becasue userspace
      wants to do one thing but the kernel manager thought we
      are trying to do another.
      
      This patch fixes the problem by just exporting the pid of
      the entity that created the session. Userspace programs like
      iscsid, iscsiadm, iscsistart, qlogic's tools, etc, can then
      figure out which sessions they own and only manage them.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      0c70d84b
  4. 03 11月, 2011 1 次提交
  5. 20 10月, 2011 4 次提交
  6. 27 8月, 2011 11 次提交
  7. 24 3月, 2011 1 次提交
  8. 25 2月, 2011 3 次提交
  9. 22 12月, 2010 1 次提交
  10. 10 9月, 2010 1 次提交
  11. 28 7月, 2010 3 次提交
  12. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  13. 05 12月, 2009 2 次提交
  14. 05 9月, 2009 1 次提交
  15. 31 7月, 2009 1 次提交
  16. 22 6月, 2009 1 次提交
  17. 09 6月, 2009 1 次提交
  18. 24 5月, 2009 1 次提交
    • M
      [SCSI] iscsi: pass ep connect shost · 10eb0f01
      Mike Christie 提交于
      When we create the tcp/ip connection by calling ep_connect, we currently
      just go by the routing table info.
      
      I think there are two problems with this.
      
      1. Some drivers do not have access to a routing table. Some drivers like
      qla4xxx do not even know about other ports.
      
      2. If you have two initiator ports on the same subnet, the user may have
      set things up so that session1 was supposed to be run through port1. and
      session2 was supposed to be run through port2. It looks like we could
      end with both sessions going through one of the ports.
      
      Fixes for cxgb3i from Karen Xie.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      10eb0f01
  19. 16 5月, 2009 1 次提交
    • A
      [SCSI] fc-transport: Close state transition-window during rport deletion. · 9a1a69a1
      Andrew Vasquez 提交于
      Andrew Vasquez wrote:
      > fc-transport: Close state transition-window during rport deletion.
      >
      > After an rport's state has transitioned to FC_PORTSTATE_BLOCKED,
      > but, prior to making the upcall to 'block' the scsi-target
      > associated with an rport, queued commands can recycle and
      > ultimately run out of retries causing failures to propagate to
      > upper-level drivers.  Close this transition-window by returning
      > the non-'retries' modifying DID_IMM_RETRY status for submitted
      > I/Os.
      
      The same can happen for iscsi when transitioning from logged in
      to failed and blocking the sdevs.
      
      This patch converts iscsi and fc's transitions back to use DID_IMM_RETRY
      instead of DID_TRANSPORT_DISRUPTED which has a limited number of retries
      that we do not want to use for handling this race.
      Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
      [Addition of iscsi and fc port online devloss case conversion by Mike Christie]
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      9a1a69a1