1. 22 10月, 2010 1 次提交
  2. 21 10月, 2010 1 次提交
    • S
      cifs: convert cifs_tcp_ses_lock from a rwlock to a spinlock · 3f9bcca7
      Suresh Jayaraman 提交于
      cifs_tcp_ses_lock is a rwlock with protects the cifs_tcp_ses_list,
      server->smb_ses_list and the ses->tcon_list. It also protects a few
      ref counters in server, ses and tcon. In most cases the critical section
      doesn't seem to be large, in a few cases where it is slightly large, there
      seem to be really no benefit from concurrent access. I briefly considered RCU
      mechanism but it appears to me that there is no real need.
      
      Replace it with a spinlock and get rid of the last rwlock in the cifs code.
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      3f9bcca7
  3. 18 10月, 2010 1 次提交
    • J
      cifs: convert GlobalSMBSeslock from a rwlock to regular spinlock · 4477288a
      Jeff Layton 提交于
      Convert this lock to a regular spinlock
      
      A rwlock_t offers little value here. It's more expensive than a regular
      spinlock unless you have a fairly large section of code that runs under
      the read lock and can benefit from the concurrency.
      
      Additionally, we need to ensure that the refcounting for files isn't
      racy and to do that we need to lock areas that can increment it for
      write. That means that the areas that can actually use a read_lock are
      very few and relatively infrequently used.
      
      While we're at it, change the name to something easier to type, and fix
      a bug in find_writable_file. cifsFileInfo_put can sleep and shouldn't be
      called while holding the lock.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      4477288a
  4. 13 10月, 2010 1 次提交
  5. 30 9月, 2010 2 次提交
  6. 23 7月, 2010 1 次提交
    • T
      cifs: use workqueue instead of slow-work · 9b646972
      Tejun Heo 提交于
      Workqueue can now handle high concurrency.  Use system_nrt_wq
      instead of slow-work.
      
      * Updated is_valid_oplock_break() to not call cifs_oplock_break_put()
        as advised by Steve French.  It might cause deadlock.  Instead,
        reference is increased after queueing succeeded and
        cifs_oplock_break() briefly grabs GlobalSMBSeslock before putting
        the cfile to make sure it doesn't put before the matching get is
        finished.
      
      * Anton Blanchard reported that cifs conversion was using now gone
        system_single_wq.  Use system_nrt_wq which provides non-reentrance
        guarantee which is enough and much better.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NSteve French <sfrench@samba.org>
      Cc: Anton Blanchard <anton@samba.org>
      9b646972
  7. 21 4月, 2010 1 次提交
    • J
      [CIFS] Neaten cERROR and cFYI macros, reduce text space · b6b38f70
      Joe Perches 提交于
      Neaten cERROR and cFYI macros, reduce text space
      ~2.5K
      
      Convert '__FILE__ ": " fmt' to '"%s: " fmt', __FILE__' to save text space
      Surround macros with do {} while
      Add parentheses to macros
      Make statement expression macro from macro with assign
      Remove now unnecessary parentheses from cFYI and cERROR uses
      
      defconfig with CIFS support old
      $ size fs/cifs/built-in.o
         text	   data	    bss	    dec	    hex	filename
       156012	   1760	    148	 157920	  268e0	fs/cifs/built-in.o
      
      defconfig with CIFS support old
      $ size fs/cifs/built-in.o
         text	   data	    bss	    dec	    hex	filename
       153508	   1760	    148	 155416	  25f18	fs/cifs/built-in.o
      
      allyesconfig old:
      $ size fs/cifs/built-in.o
         text	   data	    bss	    dec	    hex	filename
       309138	   3864	  74824	 387826	  5eaf2	fs/cifs/built-in.o
      
      allyesconfig new
      $ size fs/cifs/built-in.o
         text	   data	    bss	    dec	    hex	filename
       305655	   3864	  74824	 384343	  5dd57	fs/cifs/built-in.o
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      b6b38f70
  8. 25 2月, 2010 1 次提交
  9. 16 11月, 2009 1 次提交
  10. 07 11月, 2009 1 次提交
  11. 25 9月, 2009 1 次提交
    • J
      cifs: convert oplock breaks to use slow_work facility (try #4) · 3bc303c2
      Jeff Layton 提交于
      This is the fourth respin of the patch to convert oplock breaks to
      use the slow_work facility.
      
      A customer of ours was testing a backport of one of the earlier
      patchsets, and hit a "Busy inodes after umount..." problem. An oplock
      break job had raced with a umount, and the superblock got torn down and
      its memory reused. When the oplock break job tried to dereference the
      inode->i_sb, the kernel oopsed.
      
      This patchset has the oplock break job hold an inode and vfsmount
      reference until the oplock break completes.  With this, there should be
      no need to take a tcon reference (the vfsmount implicitly holds one
      already).
      
      Currently, when an oplock break comes in there's a chance that the
      oplock break job won't occur if the allocation of the oplock_q_entry
      fails. There are also some rather nasty races in the allocation and
      handling these structs.
      
      Rather than allocating oplock queue entries when an oplock break comes
      in, add a few extra fields to the cifsFileInfo struct. Get rid of the
      dedicated cifs_oplock_thread as well and queue the oplock break job to
      the slow_work thread pool.
      
      This approach also has the advantage that the oplock break jobs can
      potentially run in parallel rather than be serialized like they are
      today.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      3bc303c2
  12. 16 9月, 2009 2 次提交
  13. 30 4月, 2009 2 次提交
  14. 26 12月, 2008 2 次提交
  15. 21 11月, 2008 1 次提交
    • S
      [CIFS] Do not attempt to close invalidated file handles · ddb4cbfc
      Steve French 提交于
      If a connection with open file handles has gone down
      and come back up and reconnected without reopening
      the file handle yet, do not attempt to send an SMB close
      request for this handle in cifs_close.  We were
      checking for the connection being invalid in cifs_close
      but since the connection may have been reconnected
      we also need to check whether the file handle
      was marked invalid (otherwise we could close the
      wrong file handle by accident).
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ddb4cbfc
  16. 17 11月, 2008 1 次提交
  17. 15 11月, 2008 1 次提交
    • 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
  18. 14 11月, 2008 1 次提交
  19. 12 10月, 2008 1 次提交
  20. 23 9月, 2008 1 次提交
  21. 24 5月, 2008 1 次提交
  22. 29 4月, 2008 1 次提交
  23. 08 2月, 2008 1 次提交
  24. 26 10月, 2007 1 次提交
  25. 29 9月, 2007 1 次提交
  26. 18 7月, 2007 1 次提交
  27. 13 7月, 2007 1 次提交
  28. 10 7月, 2007 1 次提交
  29. 08 7月, 2007 1 次提交
  30. 22 1月, 2007 1 次提交
  31. 08 12月, 2006 2 次提交
  32. 13 10月, 2006 1 次提交
  33. 29 9月, 2006 1 次提交
  34. 01 6月, 2006 1 次提交
  35. 05 3月, 2006 1 次提交
    • S
      [CIFS] Always match oplock break (cache notification) to the right tcp · e77e6f3b
      Steve French 提交于
      session when multiply mounted.
      
      Fixes slow response when cifs client is mounted to shares on multiple
      servers and oplock break occurs (usually due to attempt to multiply open a
      file).  When treeids on mutiple mounted shares match and we find the wrong
      match first, we searched for the wrong cached files to send oplock break
      response for which usually meant that no matching file was found and thus
      the server would have to timeout the notification.  Oplock break timeout is
      about 20 seconds on some servers so this could cause significantly slower
      performance on file open calls in a few cases (in particular when multiple
      shares are mounted from multiple servers, tree ids match, and we have a
      cached file which is later opened multiple times).  This was the most
      important of the bugs that was found and fixed at Connectathon
      (interoperability testing event) this week.
      
      Acked-by:  Shaggy (shaggy@austin.ibm.com)
      Signed-off-by: Steve French (sfrench@us.ibm.com)
      e77e6f3b