1. 28 May, 2006 9 commits
  2. 20 May, 2006 28 commits
  3. 10 May, 2006 3 commits
    • James Bottomley's avatar
      [SCSI] fix proc_scsi_write to return "length" on success with remove-single-device case · 2ca48a13
      James Bottomley authored
      Problem spotted by: Suzuki K P <suzuki@in.ibm.com>
      
      A zero return on success isn't correct for filesystem write functions.
      They should either return negative error or the length of bytes
      consumed.  Add code to convert our zero on success error return to
      return the length of bytes passed in.
      
      This fixes the following:
      
      $ echo "scsi remove-single-device 0 0 3 0" > /proc/scsi/scsi
      bash: echo: write error: No such device or address"
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      2ca48a13
    • Mike Christie's avatar
      [SCSI] iscsi: dequeue all buffers from queue · 665b44ae
      Mike Christie authored
      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: default avatarMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      665b44ae
    • Mike Christie's avatar
      [SCSI] iscsi: increment expstatsn during login · 8d2860b3
      Mike Christie authored
      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: default avatarMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      8d2860b3