1. 03 6月, 2007 1 次提交
    • 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 6 次提交
  3. 12 3月, 2007 3 次提交
  4. 10 2月, 2007 1 次提交
  5. 06 1月, 2007 3 次提交
  6. 10 11月, 2006 2 次提交
  7. 21 9月, 2006 1 次提交
  8. 03 9月, 2006 7 次提交
  9. 29 7月, 2006 7 次提交
  10. 29 6月, 2006 1 次提交
  11. 06 6月, 2006 3 次提交
  12. 20 5月, 2006 3 次提交
  13. 10 5月, 2006 2 次提交
    • M
      [SCSI] iscsi: dequeue all buffers from queue · 665b44ae
      Mike Christie 提交于
      debugged by wrwhitehead@novell.com
      patch and analysis by fujita.tomonori@lab.ntt.co.jp
      
      Only tcp_read_sock and recv_actor (iscsi_tcp_data_recv for us) see
      desc.count. It is is used just for permitting tcp_read_sock to read
      the portion of data in the socket.
      
      When iscsi_tcp_data_recv sees a partial header, it sets
      desc.count. However, it is possible that the next skb (containing the
      rest of the header) still does not come. So I'm not sure that this
      scheme is completely correct.
      
      Ideally, we should use the exact length of the data in the socket for
      desc.count. However, it is not so simple (see SIOCINQ in
      tcp_ioctl). So I think that iscsi_tcp_data_recv can just stop playing
      with desc.count and tell tcp_read_sock to read the all skbs. As
      proposed already, if iscsi_tcp_data_ready sets desc.count to
      non-zero, tcp_read_sock does that.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      665b44ae
    • M
      [SCSI] iscsi: increment expstatsn during login · 8d2860b3
      Mike Christie 提交于
      debugged by Ming and Rohan:
      
      The problem Ming and Rohan debugged was that during a normal session
      login, open-iscsi is not incrementing the exp_statsn counter. It was
      stuck at zero. From the RFC, it looks like if the login response PDU has
      a successful status then we should be incrementing that value. Also from
      the RFC, it looks like if when we drop a connection then reconnect, we
      should be using the exp_statsn from the old connection in the next
      relogin attempt.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      8d2860b3