1. 25 7月, 2012 2 次提交
  2. 23 5月, 2012 1 次提交
  3. 17 5月, 2012 1 次提交
  4. 24 3月, 2012 3 次提交
  5. 22 3月, 2012 1 次提交
  6. 18 1月, 2012 1 次提交
  7. 13 10月, 2011 2 次提交
  8. 12 8月, 2011 1 次提交
    • S
      [CIFS] Cleanup use of CONFIG_CIFS_STATS2 ifdef to make transport routines more readable · 789e6661
      Steve French 提交于
      Christoph had requested that the stats related code (in
      CONFIG_CIFS_STATS2) be moved into helpers to make code flow more
      readable.   This patch should help.   For example the following
      section from transport.c
      
                             spin_unlock(&GlobalMid_Lock);
                             atomic_inc(&ses->server->num_waiters);
                             wait_event(ses->server->request_q,
                                        atomic_read(&ses->server->inFlight)
                                          < cifs_max_pending);
                             atomic_dec(&ses->server->num_waiters);
                             spin_lock(&GlobalMid_Lock);
      
      becomes simpler (with the patch below):
                             spin_unlock(&GlobalMid_Lock);
                             cifs_num_waiters_inc(server);
                             wait_event(server->request_q,
                                        atomic_read(&server->inFlight)
                                          < cifs_max_pending);
                             cifs_num_waiters_dec(server);
                             spin_lock(&GlobalMid_Lock);
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      CC: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      Reviewed-by: NPavel Shilovsky <piastry@etersoft.ru>
      789e6661
  9. 27 5月, 2011 1 次提交
  10. 19 5月, 2011 1 次提交
    • J
      cifs: keep BCC in little-endian format · 820a803f
      Jeff Layton 提交于
      This is the same patch as originally posted, just with some merge
      conflicts fixed up...
      
      Currently, the ByteCount is usually converted to host-endian on receive.
      This is confusing however, as we need to keep two sets of routines for
      accessing it, and keep track of when to use each routine. Munging
      received packets like this also limits when the signature can be
      calulated.
      
      Simplify the code by keeping the received ByteCount in little-endian
      format. This allows us to eliminate a set of routines for accessing it
      and we can now drop the *_le suffixes from the accessor functions since
      that's now implied.
      
      While we're at it, switch all of the places that read the ByteCount
      directly to use the get_bcc inline which should also clean up some
      unaligned accesses.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      820a803f
  11. 12 4月, 2011 1 次提交
    • J
      cifs: replace /proc/fs/cifs/Experimental with a module parm · bdf1b03e
      Jeff Layton 提交于
      This flag currently only affects whether we allow "zero-copy" writes
      with signing enabled. Typically we map pages in the pagecache directly
      into the write request. If signing is enabled however and the contents
      of the page change after the signature is calculated but before the
      write is sent then the signature will be wrong. Servers typically
      respond to this by closing down the socket.
      
      Still, this can provide a performance benefit so the "Experimental" flag
      was overloaded to allow this. That's really not a good place for this
      option however since it's not clear what that flag does.
      
      Move that flag instead to a new module parameter that better describes
      its purpose. That's also better since it can be set at module insertion
      time by configuring modprobe.d.
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      bdf1b03e
  12. 21 1月, 2011 1 次提交
    • J
      cifs: allow for different handling of received response · 2b84a36c
      Jeff Layton 提交于
      In order to incorporate async requests, we need to allow for a more
      general way to do things on receive, rather than just waking up a
      process.
      
      Turn the task pointer in the mid_q_entry into a callback function and a
      generic data pointer. When a response comes in, or the socket is
      reconnected, cifsd can call the callback function in order to wake up
      the process.
      
      The default is to just wake up the current process which should mean no
      change in behavior for existing code.
      
      Also, clean up the locking in cifs_reconnect. There doesn't seem to be
      any need to hold both the srv_mutex and GlobalMid_Lock when walking the
      list of mids.
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      2b84a36c
  13. 20 1月, 2011 1 次提交
  14. 10 1月, 2011 1 次提交
  15. 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
  16. 06 8月, 2010 1 次提交
    • S
      cifs: show features compiled in as part of DebugData · f579903e
      Suresh Jayaraman 提交于
      Fixed the nit pointed out by Jeff.
      
      From: Suresh Jayaraman <sjayaraman@suse.de>
      Subject: [PATCH 1/2] cifs: show features compiled in as part of DebugData
      
      This patch adds the features that are compiled in to the CIFS debugging data
      as shown below:
      
      	$cat /proc/fs/cifs/DebugData
      	Display Internal CIFS Data Structures for Debugging
      	---------------------------------------------------
      	CIFS Version 1.64
      	Features: dfs fscache posix spnego xattr
      	Active VFS Requests: 0
      	...
      
      This patch provides a definitive way to tell what features are currently
      enabled in the running kernel. This could also help debugging.
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Cc: Jeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      f579903e
  17. 27 4月, 2010 1 次提交
  18. 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
  19. 10 7月, 2009 1 次提交
  20. 31 3月, 2009 1 次提交
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  21. 12 3月, 2009 1 次提交
    • S
      [CIFS] Send SMB flush in cifs_fsync · b298f223
      Steve French 提交于
      In contrast to the now-obsolete smbfs, cifs does not send SMB_COM_FLUSH
      in response to an explicit fsync(2) to guarantee that all volatile data
      is written to stable storage on the server side, provided the server
      honors the request (which, to my knowledge, is true for Windows and
      Samba with 'strict sync' enabled).
      This patch modifies the cifs_fsync implementation to restore the
      fsync-behavior of smbfs by triggering SMB_COM_FLUSH after sending
      outstanding data on the client side to the server.
      Signed-off-by: NHorst Reiterer <horst.reiterer@gmail.com>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      b298f223
  22. 17 11月, 2008 2 次提交
  23. 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
  24. 14 11月, 2008 1 次提交
  25. 09 8月, 2008 1 次提交
  26. 24 7月, 2008 3 次提交
  27. 29 4月, 2008 1 次提交
  28. 18 2月, 2008 1 次提交
  29. 13 2月, 2008 1 次提交
  30. 08 2月, 2008 1 次提交
  31. 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
  32. 15 9月, 2007 1 次提交