1. 17 4月, 2009 1 次提交
  2. 18 3月, 2009 1 次提交
  3. 12 3月, 2009 2 次提交
    • S
      [CIFS] fix build error · 4717bed6
      Steve French 提交于
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      4717bed6
    • S
      [CIFS] Add new nostrictsync cifs mount option to avoid slow SMB flush · be652445
      Steve French 提交于
      If this mount option is set, when an application does an
      fsync call then the cifs client does not send an SMB Flush
      to the server (to force the server to write all dirty data
      for this file immediately to disk), although cifs still sends
      all dirty (cached) file data to the server and waits for the
      server to respond to the write write.  Since SMB Flush can be
      very slow, and some servers may be reliable enough (to risk
      delaying slightly flushing the data to disk on the server),
      turning on this option may be useful to improve performance for
      applications that fsync too much, at a small risk of server
      crash.  If this mount option is not set, by default cifs will
      send an SMB flush request (and wait for a response) on every
      fsync call.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      be652445
  4. 21 2月, 2009 1 次提交
  5. 31 1月, 2009 1 次提交
  6. 29 1月, 2009 3 次提交
  7. 26 12月, 2008 11 次提交
  8. 18 11月, 2008 1 次提交
  9. 17 11月, 2008 1 次提交
  10. 15 11月, 2008 3 次提交
  11. 14 11月, 2008 3 次提交
    • S
      [CIFS] clean up server protocol handling · 3ec332ef
      Steve French 提交于
      We're currently declaring both a sockaddr_in and sockaddr6_in on the
      stack, but we really only need storage for one of them. Declare a
      sockaddr struct and cast it to the proper type. Also, eliminate the
      protocolType field in the TCP_Server_Info struct. It's redundant since
      we have a sa_family field in the sockaddr anyway.
      
      We may need to revisit this if SCTP is ever implemented, but for now
      this will simplify the code.
      
      CIFS over IPv6 also has a number of problems currently. This fixes all
      of them that I found. Eventually, it would be nice to move more of the
      code to be protocol independent, but this is a start.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      3ec332ef
    • D
      CRED: Wrap task credential accesses in the CIFS filesystem · a001e5b5
      David Howells 提交于
      Wrap access to task credentials so that they can be separated more easily from
      the task_struct during the introduction of COW creds.
      
      Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().
      
      Change some task->e?[ug]id to task_e?[ug]id().  In some places it makes more
      sense to use RCU directly rather than a convenient wrapper; these will be
      addressed by later patches.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-by: NJames Morris <jmorris@namei.org>
      Acked-by: NSerge Hallyn <serue@us.ibm.com>
      Cc: Steve French <sfrench@samba.org>
      Cc: linux-cifs-client@lists.samba.org
      Signed-off-by: NJames Morris <jmorris@namei.org>
      a001e5b5
    • S
      [CIFS] Fix cifs reconnection flags · 3b795210
      Steve French 提交于
      In preparation for Jeff's big umount/mount fixes to remove the possibility of
      various races in cifs mount and linked list handling of sessions, sockets and
      tree connections, this patch cleans up some repetitive code in cifs_mount,
      and addresses a problem with ses->status and tcon->tidStatus in which we
      were overloading the "need_reconnect" state with other status in that
      field.  So the "need_reconnect" flag has been broken out from those
      two state fields (need reconnect was not mutually exclusive from some of the
      other possible tid and ses states).  In addition, a few exit cases in
      cifs_mount were cleaned up, and a problem with a tcon flag (for lease support)
      was not being set consistently for the 2nd mount of the same share
      
      CC: Jeff Layton <jlayton@redhat.com>
      CC: Shirish Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      3b795210
  12. 04 11月, 2008 1 次提交
  13. 31 10月, 2008 1 次提交
  14. 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
  15. 23 10月, 2008 2 次提交
    • J
      cifs: handle the TCP_Server_Info->tsk field more carefully · b1c8d2b4
      Jeff Layton 提交于
      cifs: handle the TCP_Server_Info->tsk field more carefully
      
      We currently handle the TCP_Server_Info->tsk field without any locking,
      but with some half-measures to try and prevent races. These aren't
      really sufficient though. When taking down cifsd, use xchg() to swap
      the contents of the tsk field with NULL so we don't end up trying
      to send it more than one signal. Also, don't allow cifsd to exit until
      the signal is received if we expect one.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      b1c8d2b4
    • 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
  16. 17 10月, 2008 2 次提交
    • J
      [CIFS] eliminate usage of kthread_stop for cifsd · 469ee614
      Jeff Layton 提交于
      When cifs_demultiplex_thread was converted to a kthread based kernel
      thread, great pains were taken to make it so that kthread_stop would be
      used to bring it down. This just added unnecessary complexity since we
      needed to use a signal anyway to break out of kernel_recvmsg.
      
      Also, cifs_demultiplex_thread does a bit of cleanup as it's exiting, and
      we need to be certain that this gets done. It's possible for a kthread
      to exit before its main function is ever run if kthread_stop is called
      soon after its creation. While I'm not sure that this is a real problem
      with cifsd now, it could be at some point in the future if cifs_mount is
      ever changed to bring down the thread quickly.
      
      The upshot here is that using kthread_stop to bring down the thread just
      adds extra complexity with no real benefit. This patch changes the code
      to use the original method to bring down the thread, but still leaves it
      so that the thread is actually started with kthread_run.
      
      This seems to fix the deadlock caused by the reproducer in this bug
      report:
      
      https://bugzilla.samba.org/show_bug.cgi?id=5720Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      469ee614
    • S
      [CIFS] Add nodfs mount option · 2c1b8615
      Steve French 提交于
      Older samba server (eg. 3.0.24 from Debian etch) don't work correctly,
      if DFS paths are used. Such server claim that they support DFS, but fail
      to process some requests with DFS paths. Starting with Linux 2.6.26,
      the cifs clients starts sending DFS paths in such situations, rendering
      it unuseable with older samba servers.
      
      The nodfs mount options forces a share to be used with non DFS paths,
      even if the server claims, that it supports it.
      Signed-off-by: NMartin Koegler <mkoegler@auto.tuwien.ac.at>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Acked-by: NIgor Mammedov <niallain@gmail.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      2c1b8615
  17. 20 8月, 2008 1 次提交
  18. 09 8月, 2008 1 次提交
  19. 06 8月, 2008 1 次提交
  20. 04 8月, 2008 1 次提交
  21. 24 7月, 2008 1 次提交
    • H
      cifs: assorted endian annotations · 5ca33c6a
      Harvey Harrison 提交于
      fs/cifs/cifssmb.c:3917:13: warning: incorrect type in assignment (different base types)
      fs/cifs/cifssmb.c:3917:13:    expected bool [unsigned] [usertype] is_unicode
      fs/cifs/cifssmb.c:3917:13:    got restricted __le16
      
      The comment explains why __force is used here.
      fs/cifs/connect.c:458:16: warning: cast to restricted __be32
      fs/cifs/connect.c:458:16: warning: cast to restricted __be32
      fs/cifs/connect.c:458:16: warning: cast to restricted __be32
      fs/cifs/connect.c:458:16: warning: cast to restricted __be32
      fs/cifs/connect.c:458:16: warning: cast to restricted __be32
      fs/cifs/connect.c:458:16: warning: cast to restricted __be32
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      5ca33c6a