1. 26 12月, 2008 3 次提交
    • J
      cifs: fix wait_for_response to time out sleeping processes correctly · 85705524
      Jeff Layton 提交于
      cifs: fix wait_for_response to time out sleeping processes correctly
      
      The current scheme that CIFS uses to sleep and wait for a response is
      not quite what we want. After sending a request, wait_for_response puts
      the task to sleep with wait_event(). One of the conditions for
      wait_event is a timeout (using time_after()).
      
      The problem with this is that there is no guarantee that the process
      will ever be woken back up. If the server stops sending data, then
      cifs_demultiplex_thread will leave its response queue sleeping.
      
      I think the only thing that saves us here is the fact that
      cifs_dnotify_thread periodically (every 15s) wakes up sleeping processes
      on all response_q's that have calls in flight.  This makes for
      unnecessary wakeups of some processes. It also means large variability
      in the timeouts since they're all woken up at once.
      
      Instead of this, put the tasks to sleep with wait_event_timeout. This
      makes them wake up on their own if they time out. With this change,
      cifs_dnotify_thread should no longer be needed.
      
      I've been testing this in conjunction with some other patches that I'm
      working on. It doesn't seem to affect performance at all with with heavy
      I/O. Identical iozone -ac runs complete in almost exactly the same time
      (<1% difference in times).
      
      Thanks to Wasrshi Nimara for initially pointing this out. Wasrshi, it
      would be nice to know whether this patch also helps your testcase.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Cc: Wasrshi Nimara <warshinimara@gmail.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      85705524
    • J
      cifs: convert tcpSem to a mutex · 72ca545b
      Jeff Layton 提交于
      Mutexes are preferred for single-holder semaphores...
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      72ca545b
    • J
      24b9b06b
  2. 31 10月, 2008 1 次提交
  3. 29 10月, 2008 1 次提交
    • S
      [CIFS] Reduce number of socket retries in large write path · edf1ae40
      Steve French 提交于
      CIFS in some heavy stress conditions cifs could get EAGAIN
      repeatedly in smb_send2 which led to repeated retries and eventually
      failure of large writes which could lead to data corruption.
      
      There are three changes that were suggested by various network
      developers:
      
      1) convert cifs from non-blocking to blocking tcp sendmsg
      (we left in the retry on failure)
      2) change cifs to not set sendbuf and rcvbuf size for the socket
      (let tcp autotune the buffer sizes since that works much better
      in the TCP stack now)
      3) if we have a partial frame sent in smb_send2, mark the tcp
      session as invalid (close the socket and reconnect) so we do
      not corrupt the remaining part of the SMB with the beginning
      of the next SMB.
      
      This does not appear to hurt performance measurably and has
      been run in various scenarios, but it definately removes
      a corruption that we were seeing in some high stress
      test cases.
      Acked-by: NShirish Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      edf1ae40
  4. 23 9月, 2008 1 次提交
  5. 30 7月, 2008 1 次提交
  6. 16 4月, 2008 1 次提交
  7. 13 2月, 2008 1 次提交
  8. 08 2月, 2008 1 次提交
  9. 14 11月, 2007 1 次提交
    • S
      [CIFS] Fix buffer overflow if server sends corrupt response to small · 133672ef
      Steve French 提交于
      request
      
      In SendReceive() function in transport.c - it memcpy's
      message payload into a buffer passed via out_buf param. The function
      assumes that all buffers are of size (CIFSMaxBufSize +
      MAX_CIFS_HDR_SIZE) , unfortunately it is also called with smaller
      (MAX_CIFS_SMALL_BUFFER_SIZE) buffers.  There are eight callers
      (SMB worker functions) which are primarily affected by this change:
      
      TreeDisconnect, uLogoff, Close, findClose, SetFileSize, SetFileTimes,
      Lock and PosixLock
      
      CC: Dave Kleikamp <shaggy@austin.ibm.com>
      CC: Przemyslaw Wegrzyn <czajnik@czajsoft.pl>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      133672ef
  10. 19 10月, 2007 1 次提交
  11. 31 8月, 2007 1 次提交
  12. 13 7月, 2007 1 次提交
  13. 09 7月, 2007 1 次提交
  14. 07 7月, 2007 1 次提交
  15. 06 3月, 2007 1 次提交
  16. 08 12月, 2006 3 次提交
  17. 12 8月, 2006 4 次提交
  18. 01 6月, 2006 1 次提交
  19. 27 2月, 2006 1 次提交
  20. 24 1月, 2006 1 次提交
  21. 13 1月, 2006 1 次提交
  22. 13 12月, 2005 1 次提交
  23. 03 12月, 2005 1 次提交
  24. 30 11月, 2005 1 次提交
  25. 17 11月, 2005 1 次提交
  26. 12 10月, 2005 1 次提交
  27. 11 10月, 2005 2 次提交
  28. 08 10月, 2005 1 次提交
  29. 06 10月, 2005 2 次提交
  30. 04 10月, 2005 2 次提交