1. 21 2月, 2009 1 次提交
  2. 29 1月, 2009 1 次提交
    • J
      cifs: turn smb_send into a wrapper around smb_sendv · 0496e02d
      Jeff Layton 提交于
      cifs: turn smb_send into a wrapper around smb_sendv
      
      Rename smb_send2 to smb_sendv to make it consistent with kernel naming
      conventions for functions that take a vector.
      
      There's no need to have 2 functions to handle sending SMB calls. Turn
      smb_send into a wrapper around smb_sendv. This also allows us to
      properly mark the socket as needing to be reconnected when there's a
      partial send from smb_send.
      
      Also, in practice we always use the address and noblocksnd flag
      that's attached to the TCP_Server_Info. There's no need to pass
      them in as separate args to smb_sendv.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Acked-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      0496e02d
  3. 26 12月, 2008 1 次提交
  4. 15 11月, 2008 2 次提交
    • J
      cifs: reinstate sharing of SMB sessions sans races · 14fbf50d
      Jeff Layton 提交于
      We do this by abandoning the global list of SMB sessions and instead
      moving to a per-server list. This entails adding a new list head to the
      TCP_Server_Info struct. The refcounting for the cifsSesInfo is moved to
      a non-atomic variable. We have to protect it by a lock anyway, so there's
      no benefit to making it an atomic. The list and refcount are protected
      by the global cifs_tcp_ses_lock.
      
      The patch also adds a new routines to find and put SMB sessions and
      that properly take and put references under the lock.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      14fbf50d
    • J
      cifs: disable sharing session and tcon and add new TCP sharing code · e7ddee90
      Jeff Layton 提交于
      The code that allows these structs to be shared is extremely racy.
      Disable the sharing of SMB and tcon structs for now until we can
      come up with a way to do this that's race free.
      
      We want to continue to share TCP sessions, however since they are
      required for multiuser mounts. For that, implement a new (hopefully
      race-free) scheme. Add a new global list of TCP sessions, and take
      care to get a reference to it whenever we're dealing with one.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      e7ddee90
  5. 14 11月, 2008 1 次提交
  6. 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
  7. 25 9月, 2008 1 次提交
  8. 24 9月, 2008 1 次提交
  9. 06 8月, 2008 3 次提交
  10. 15 5月, 2008 2 次提交
  11. 13 5月, 2008 1 次提交
  12. 09 5月, 2008 1 次提交
  13. 29 4月, 2008 1 次提交
  14. 25 4月, 2008 1 次提交
  15. 16 4月, 2008 1 次提交
  16. 15 3月, 2008 1 次提交
    • S
      [CIFS] file create with acl support enabled is slow · 8b1327f6
      Steve French 提交于
      Shirish Pargaonkar noted:
      With cifsacl mount option, when a file is created on the Windows server,
      exclusive oplock is broken right away because the get cifs acl code
      again opens the file to obtain security descriptor.
      The client does not have the newly created file handle or inode in any
      of its lists yet so it does not respond to oplock break and server waits for
      its duration and then responds to the second open. This slows down file
      creation signficantly.  The fix is to pass the file descriptor to the get
      cifsacl code wherever available so that get cifs acl code does not send
      second open (NT Create ANDX) and oplock is not broken.
      
      CC: Shirish Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      8b1327f6
  17. 11 3月, 2008 1 次提交
  18. 13 2月, 2008 2 次提交
  19. 08 2月, 2008 1 次提交
  20. 25 1月, 2008 2 次提交
  21. 31 12月, 2007 1 次提交
  22. 17 11月, 2007 3 次提交
  23. 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
  24. 03 11月, 2007 1 次提交
    • J
      [CIFS] implement upcalls for SPNEGO blob via keyctl API · 09fe7ba7
      Jeff Layton 提交于
      Add routines to handle upcalls to userspace via keyctl for the purpose
      of getting a SPNEGO blob for a particular uid and server combination.
      
      Clean up the Makefile a bit and set it up to only compile cifs_spnego
      if CONFIG_CIFS_UPCALL is set. Also change CONFIG_CIFS_UPCALL to depend
      on CONFIG_KEYS rather than CONFIG_CONNECTOR.
      
      cifs_spnego.h defines the communications between kernel and userspace
      and is intended to be shared with userspace programs.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      09fe7ba7
  25. 31 10月, 2007 1 次提交
  26. 26 10月, 2007 1 次提交
  27. 20 10月, 2007 1 次提交
  28. 19 10月, 2007 1 次提交
  29. 04 10月, 2007 1 次提交
  30. 26 9月, 2007 1 次提交
  31. 31 8月, 2007 1 次提交
  32. 15 7月, 2007 1 次提交
    • S
      [CIFS] Add support for new POSIX unlink · 2d785a50
      Steve French 提交于
      In the cleanup phase of the dbench test, we were noticing sharing
      violation followed by failed directory removals when dbench
      did not close the test files before the cleanup phase started.
      Using the new POSIX unlink, which Samba has supported for a few
      months, avoids this.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      2d785a50