1. 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
  2. 23 10月, 2008 1 次提交
    • S
      [CIFS] improve setlease handling · 84210e91
      Steve French 提交于
      fcntl(F_SETLEASE) currently is not exported by cifs (nor by local file
      systems) so cifs grants leases based on how other local processes have
      opened the file not by whether the file is cacheable (oplocked).  This
      adds the check to make sure that the file is cacheable on the client
      before checking whether we can grant the lease locally
      (generic_setlease).  It also adds a mount option for cifs (locallease)
      if the user wants to override this and try to grant leases even
      if the server did not grant oplock.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      84210e91
  3. 20 10月, 2008 1 次提交
  4. 08 10月, 2008 1 次提交
    • S
      [CIFS] make sure we have the right resume info before calling CIFSFindNext · 0752f152
      Steve French 提交于
      When we do a seekdir() or equivalent, we usually end up doing a
      FindFirst call and then call FindNext until we get to the offset that we
      want. The problem is that when we call FindNext, the code usually
      doesn't have the proper info (mostly, the filename of the entry from the
      last search) to resume the search.
      
      Add a "last_entry" field to the cifs_search_info that points to the last
      entry in the search. We calculate this pointer by using the
      LastNameOffset field from the search parms that are returned. We then
      use that info to do a cifs_save_resume_key before we call CIFSFindNext.
      
      This patch allows CIFS to reliably pass the "telldir" connectathon test.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      CC: Stable <stable@kernel.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      0752f152
  5. 20 8月, 2008 1 次提交
  6. 24 7月, 2008 1 次提交
  7. 24 5月, 2008 1 次提交
  8. 16 5月, 2008 1 次提交
  9. 29 4月, 2008 1 次提交
  10. 16 2月, 2008 1 次提交
  11. 25 1月, 2008 1 次提交
  12. 17 11月, 2007 2 次提交
  13. 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
  14. 17 10月, 2007 2 次提交
  15. 13 10月, 2007 1 次提交
  16. 05 10月, 2007 1 次提交
    • S
      [CIFS] Fix cifsd so shuts down when signing fails during mount · a013689d
      Steve French 提交于
      Fixes two problems:
      1) we dropped down to negotiating lanman if we did not recognize the
      mechanism (krb5 e.g.)
      2) we did not stop cifsd (thus will fail when doing rmod cifs with
      slab free errors) when we fail tcon but have a bad session (which is
      the case in which signing is required but we don't allow signing on
      the client)
      
      It also turns on extended security flag in the header when passing
      "sec=krb5" on mount command (although kerberos support is not done of
      course)
      Acked-by: NJeff Layton <jlayton@redhat.com>
      CC: Shaggy <shaggy@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      a013689d
  17. 29 9月, 2007 2 次提交
  18. 25 9月, 2007 1 次提交
  19. 19 7月, 2007 1 次提交
  20. 09 7月, 2007 1 次提交
  21. 29 6月, 2007 1 次提交
  22. 03 5月, 2007 1 次提交
  23. 27 2月, 2007 1 次提交
  24. 30 9月, 2006 3 次提交
  25. 29 9月, 2006 1 次提交
  26. 12 8月, 2006 2 次提交
  27. 27 6月, 2006 1 次提交
  28. 04 6月, 2006 1 次提交
  29. 02 6月, 2006 1 次提交
  30. 01 6月, 2006 1 次提交
  31. 14 2月, 2006 1 次提交
    • S
      [CIFS] SessionSetup cleanup part 2 · 5815449d
      Steve French 提交于
      The cifs session setup code has three cases, and a fourth for backlevel
      LANMAN2 style session setup needed to be added.  This new session setup
      implmentation will eventually replace the other three and should be
      easier to read while fixing a few minor problems (not setting
      the LARGE READ/WRITEX flags when NTLMSSP was negotiated for example) and
      adding support for NTLMv2 (which will be added with the next patch. In the
      meantime, this code is marked in an CONFIG_CIFS_EXPERIMENTAL block and will
      not be turned on by default until it is tested against more server types.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      5815449d
  32. 13 1月, 2006 1 次提交
  33. 13 12月, 2005 1 次提交
  34. 04 12月, 2005 1 次提交