1. 28 May, 2006 10 commits
  2. 20 May, 2006 28 commits
  3. 10 May, 2006 2 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