1. 26 8月, 2014 1 次提交
  2. 17 8月, 2014 1 次提交
    • P
      CIFS: Fix SMB2 readdir error handling · 52755808
      Pavel Shilovsky 提交于
      SMB2 servers indicates the end of a directory search with
      STATUS_NO_MORE_FILE error code that is not processed now.
      This causes generic/257 xfstest to fail. Fix this by triggering
      the end of search by this error code in SMB2_query_directory.
      
      Also when negotiating CIFS protocol we tell the server to close
      the search automatically at the end and there is no need to do
      it itself. In the case of SMB2 protocol, we need to close it
      explicitly - separate close directory checks for different
      protocols.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      52755808
  3. 20 1月, 2014 1 次提交
  4. 12 11月, 2013 1 次提交
  5. 21 9月, 2013 1 次提交
  6. 09 9月, 2013 1 次提交
  7. 07 8月, 2013 1 次提交
  8. 29 6月, 2013 1 次提交
  9. 27 6月, 2013 1 次提交
    • J
      revalidate directories instiantiated via FIND_* in order to handle DFS referrals · 2a2c41c0
      Jeff Layton 提交于
      We've had a long-standing problem with DFS referral points. CIFS servers
      generally try to make them look like directories in FIND_FIRST/NEXT
      responses. When you go to try to do a FIND_FIRST on them though, the
      server will then (correctly) return STATUS_PATH_NOT_COVERED. Mostly this
      manifests as spurious EREMOTE errors back to userland.
      
      This patch attempts to fix this by marking directories that are
      discovered via FIND_FIRST/NEXT for revaldiation. When the lookup code
      runs across them again, we'll reissue a QPathInfo against them and that
      will make it chase the referral properly.
      
      There is some performance penalty involved here and no I haven't
      measured it -- it'll be highly dependent upon the workload and contents
      of the mounted share. To try and mitigate that though, the code only
      marks the inode for revalidation when it's possible to run across a DFS
      referral. i.e.: when the kernel has DFS support built in and the share
      is "in DFS"
      
      [At the Microsoft plugfest we noted that usually the DFS links had
      the REPARSE attribute tag enabled - DFS junctions are reparse points
      after all - so I just added a check for that flag too so the
      performance impact should be smaller - Steve]
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NSachin Prabhu <sprabhu@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      2a2c41c0
  10. 05 5月, 2013 1 次提交
    • J
      [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg · f96637be
      Joe Perches 提交于
      It's not obvious from reading the macro names that these macros
      are for debugging.  Convert the names to a single more typical
      kernel style cifs_dbg macro.
      
      	cERROR(1, ...)   -> cifs_dbg(VFS, ...)
      	cFYI(1, ...)     -> cifs_dbg(FYI, ...)
      	cFYI(DBG2, ...)  -> cifs_dbg(NOISY, ...)
      
      Move the terminating format newline from the macro to the call site.
      
      Add CONFIG_CIFS_DEBUG function cifs_vfs_err to emit the
      "CIFS VFS: " prefix for VFS messages.
      
      Size is reduced ~ 1% when CONFIG_CIFS_DEBUG is set (default y)
      
      $ size fs/cifs/cifs.ko*
         text    data     bss     dec     hex filename
       265245	   2525	    132	 267902	  4167e	fs/cifs/cifs.ko.new
       268359    2525     132  271016   422a8 fs/cifs/cifs.ko.old
      
      Other miscellaneous changes around these conversions:
      
      o Miscellaneous typo fixes
      o Add terminating \n's to almost all formats and remove them
        from the macros to be more kernel style like.  A few formats
        previously had defective \n's
      o Remove unnecessary OOM messages as kmalloc() calls dump_stack
      o Coalesce formats to make grep easier,
        added missing spaces when coalescing formats
      o Use %s, __func__ instead of embedded function name
      o Removed unnecessary "cifs: " prefixes
      o Convert kzalloc with multiply to kcalloc
      o Remove unused cifswarn macro
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      f96637be
  11. 26 2月, 2013 1 次提交
  12. 23 2月, 2013 1 次提交
  13. 21 12月, 2012 1 次提交
  14. 06 12月, 2012 2 次提交
  15. 30 11月, 2012 1 次提交
  16. 29 9月, 2012 1 次提交
  17. 25 9月, 2012 2 次提交
  18. 25 7月, 2012 1 次提交
  19. 24 7月, 2012 1 次提交
  20. 17 7月, 2012 1 次提交
  21. 17 5月, 2012 1 次提交
  22. 19 1月, 2012 1 次提交
  23. 09 12月, 2011 1 次提交
  24. 26 7月, 2011 4 次提交
  25. 21 7月, 2011 1 次提交
  26. 27 5月, 2011 1 次提交
  27. 31 1月, 2011 1 次提交
    • J
      cifs: clean up some compiler warnings · 31c2659d
      Jeff Layton 提交于
      New compiler warnings that I noticed when building a patchset based
      on recent Fedora kernel:
      
      fs/cifs/cifssmb.c: In function 'CIFSSMBSetFileSize':
      fs/cifs/cifssmb.c:4813:8: warning: variable 'data_offset' set but not used
      [-Wunused-but-set-variable]
      
      fs/cifs/file.c: In function 'cifs_open':
      fs/cifs/file.c:349:24: warning: variable 'pCifsInode' set but not used
      [-Wunused-but-set-variable]
      fs/cifs/file.c: In function 'cifs_partialpagewrite':
      fs/cifs/file.c:1149:23: warning: variable 'cifs_sb' set but not used
      [-Wunused-but-set-variable]
      fs/cifs/file.c: In function 'cifs_iovec_write':
      fs/cifs/file.c:1740:9: warning: passing argument 6 of 'CIFSSMBWrite2' from
      incompatible pointer type [enabled by default]
      fs/cifs/cifsproto.h:337:12: note: expected 'unsigned int *' but argument is
      of type 'size_t *'
      
      fs/cifs/readdir.c: In function 'cifs_readdir':
      fs/cifs/readdir.c:767:23: warning: variable 'cifs_sb' set but not used
      [-Wunused-but-set-variable]
      
      fs/cifs/cifs_dfs_ref.c: In function 'cifs_dfs_d_automount':
      fs/cifs/cifs_dfs_ref.c:342:2: warning: 'rc' may be used uninitialized in
      this function [-Wuninitialized]
      fs/cifs/cifs_dfs_ref.c:278:6: note: 'rc' was declared here
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      31c2659d
  28. 13 1月, 2011 1 次提交
  29. 10 1月, 2011 1 次提交
  30. 07 1月, 2011 2 次提交
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin 提交于
      Reduce some branches and memory accesses in dcache lookup by adding dentry
      flags to indicate common d_ops are set, rather than having to check them.
      This saves a pointer memory access (dentry->d_op) in common path lookup
      situations, and saves another pointer load and branch in cases where we
      have d_op but not the particular operation.
      
      Patched with:
      
      git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: change d_hash for rcu-walk · b1e6a015
      Nick Piggin 提交于
      Change d_hash so it may be called from lock-free RCU lookups. See similar
      patch for d_compare for details.
      
      For in-tree filesystems, this is just a mechanical change.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b1e6a015
  31. 09 12月, 2010 1 次提交
  32. 13 11月, 2010 1 次提交
  33. 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
  34. 15 10月, 2010 1 次提交