1. 03 6月, 2007 3 次提交
    • M
      [SCSI] iscsi class, iscsi_tcp, iser, qla4xxx: add netdevname sysfs attr · d8196ed2
      Mike Christie 提交于
      iSCSI must support software iscsi (iscsi_tcp, iser), hardware iscsi (qla4xxx),
      and partial offload (broadcom). To be able to allow each stack or driver
      or port (virtual or physical) to be able to log into the same target portal
      we use the initiator tuple [[HWADDRESS | NETDEVNAME], INITIATOR_NAME] and
      the target tuple [TARGETNAME, CONN_ADDRESS, CONN_PORT] to id a session.
      This patch adds the netdev name, which is used by software iscsi when
      it binds a session to a netdevice using the SO_BINDTODEVICE sock opt.
      It cannot use HWADDRESS because if someone did vlans then the same netdevice
      will have the same mac and the initiator,target id will not be unique.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Cc: Roland Dreier <rdreier@cisco.com>
      Cc: David C Somayajulu <david.somayajulu@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      d8196ed2
    • M
      [SCSI] libiscsi: make can_queue configurable · 1548271e
      Mike Christie 提交于
      This patch allows us to set can_queue and cmds_per_lun from userspace
      when we create the session/host. From there we can set it on a per
      target basis. The patch fully converts iscsi_tcp, but only hooks
      up ib_iser for cmd_per_lun since it currently has a lots of preallocations
      based on can_queue.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Cc: Roland Dreier <rdreier@cisco.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      1548271e
    • M
      [SCSI] libiscsi: fix iscsi cmdsn allocation · 77a23c21
      Mike Christie 提交于
      The cmdsn allocation and pdu transmit code can race, and we can end
      up sending a pdu with cmdsn 10 before a pdu with 5. The target will
      then fail the connection/session. This patch fixes the problem by
      delaying the cmdsn allocation until we are about to send the pdu.
      
      This also removes the xmitmutex. We were using the connection xmitmutex
      during error handling to handle races with mtask and ctask cleanup and
      completion. For ctasks we now have nice refcounting and for the mtask,
      if we hit the case where the mtask timesout and it is floating
      around somewhere in the driver, we end up dropping the session.
      And to handle session level cleanup, we use the xmit suspend bit
      along with scsi_flush_queue and the session lock to make sure
      that the xmit thread is not possibly transmitting a task while
      we are trying to kill it.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Cc: Roland Dreier <rdreier@cisco.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      77a23c21
  2. 02 6月, 2007 4 次提交
  3. 30 5月, 2007 3 次提交
  4. 25 5月, 2007 4 次提交
  5. 24 5月, 2007 1 次提交
  6. 22 5月, 2007 4 次提交
    • M
      IB/cm: Improve local id allocation · 9f81036c
      Michael S. Tsirkin 提交于
      The IB CM uses an idr for local id allocations, with a running counter
      as start_id.  This fails to generate distinct ids if
      
      1. An id is constantly created and destroyed
      2. A chunk of ids just beyond the current next_id value is occupied
      
      This in turn leads to an increased chance of connection request being
      mis-detected as a duplicate, sometimes for several retries, until
      next_id gets past the block of allocated ids. This has been observed
      in practice.
      
      As a fix, remember the last id allocated and start immediately above it.
      This also fixes a problem with the old code, where next_id might
      overflow and become negative.
      Signed-off-by: NMichael S. Tsirkin <mst@dev.mellanox.co.il>
      Acked-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      9f81036c
    • M
      IPoIB/cm: Fix SRQ WR leak · 518b1646
      Michael S. Tsirkin 提交于
      SRQ WR leakage has been observed with IPoIB/CM: e.g. flipping ports on
      and off will, with time, leak out all WRs and then all connections
      will start getting RNR NAKs.  Fix this in the way suggested by spec:
      move the QP being destroyed to the error state, wait for "Last WQE
      Reached" event and then post WR on a "drain QP" connected to the same
      CQ.  Once we observe a completion on the drain QP, it's safe to call
      ib_destroy_qp.
      Signed-off-by: NMichael S. Tsirkin <mst@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      518b1646
    • M
      IB/ipoib: Fix typos in error messages · 24bd1e4e
      Michael S. Tsirkin 提交于
      Trivial error message fixups.
      Signed-off-by: NMichael S. Tsirkin <mst@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      24bd1e4e
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  7. 21 5月, 2007 2 次提交
  8. 19 5月, 2007 13 次提交
  9. 15 5月, 2007 6 次提交