1. 17 12月, 2010 4 次提交
  2. 23 11月, 2010 2 次提交
  3. 16 11月, 2010 1 次提交
  4. 25 10月, 2010 1 次提交
    • R
      Revalidate caches on lock · 6b96724e
      Ricardo Labiaga 提交于
      Instead of blindly zapping the caches, attempt to revalidate them if
      the server has indicated that it uses high resolution timestamps.
      
      NFSv4 should be able to always revalidate the cache since the
      protocol requires the update of the change attribute on modification of
      the data.  In reality, there are servers (the Linux NFS server
      for example) that do not obey this requirement and use ctime as the
      basis for change attribute.  Long term, the server needs to be fixed.
      At this time, and to be on the safe side, continue zapping caches if
      the server indicates that it does not have a high resolution timestamp.
      Signed-off-by: NRicardo Labiaga <Ricardo.Labiaga@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6b96724e
  5. 24 10月, 2010 3 次提交
    • B
      NFS: Readdir plus in v4 · 82f2e547
      Bryan Schumaker 提交于
      By requsting more attributes during a readdir, we can mimic the readdir plus
      operation that was in NFSv3.
      
      To test, I ran the command `ls -lU --color=none` on directories with various
      numbers of files.  Without readdir plus, I see this:
      
      n files |    100    |   1,000   |  10,000   |  100,000  | 1,000,000
      --------+-----------+-----------+-----------+-----------+----------
      real    | 0m00.153s | 0m00.589s | 0m05.601s | 0m56.691s | 9m59.128s
      user    | 0m00.007s | 0m00.007s | 0m00.077s | 0m00.703s | 0m06.800s
      sys     | 0m00.010s | 0m00.070s | 0m00.633s | 0m06.423s | 1m10.005s
      access  | 3         | 1         | 1         | 4         | 31
      getattr | 2         | 1         | 1         | 1         | 1
      lookup  | 104       | 1,003     | 10,003    | 100,003   | 1,000,003
      readdir | 2         | 16        | 158       | 1,575     | 15,749
      total   | 111       | 1,021     | 10,163    | 101,583   | 1,015,784
      
      With readdir plus enabled, I see this:
      
      n files |    100    |   1,000   |  10,000   |  100,000  | 1,000,000
      --------+-----------+-----------+-----------+-----------+----------
      real    | 0m00.115s | 0m00.206s | 0m01.079s | 0m12.521s | 2m07.528s
      user    | 0m00.003s | 0m00.003s | 0m00.040s | 0m00.290s | 0m03.296s
      sys     | 0m00.007s | 0m00.020s | 0m00.120s | 0m01.357s | 0m17.556s
      access  | 3         | 1         | 1         | 1         | 7
      getattr | 2         | 1         | 1         | 1         | 1
      lookup  | 4         | 3         | 3         | 3         | 3
      readdir | 6         | 62        | 630       | 6,300     | 62,993
      total   | 15        | 67        | 635       | 6,305     | 63,004
      
      Readdir plus disabled has about a 16x increase in the number of rpc calls and
      is 4 - 5 times slower on large directories.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      82f2e547
    • B
      NFS: remove page size checking code · afa8ccc9
      Bryan Schumaker 提交于
      Remove the page size checking code for a readdir decode.  This is now done
      by decode_dirent with xdr_streams.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      afa8ccc9
    • B
      NFS: decode_dirent should use an xdr_stream · babddc72
      Bryan Schumaker 提交于
      Convert nfs*xdr.c to use an xdr stream in decode_dirent.  This will prevent a
      kernel oops that has been occuring when reading a vmapped page.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      babddc72
  6. 22 9月, 2010 1 次提交
  7. 18 9月, 2010 2 次提交
  8. 04 8月, 2010 1 次提交
  9. 15 5月, 2010 1 次提交
  10. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  11. 24 9月, 2009 1 次提交
  12. 21 4月, 2009 1 次提交
  13. 12 3月, 2009 2 次提交
  14. 11 3月, 2009 1 次提交
    • T
      NFSv3: Fix posix ACL code · ae46141f
      Trond Myklebust 提交于
      Fix a memory leak due to allocation in the XDR layer. In cases where the
      RPC call needs to be retransmitted, we end up allocating new pages without
      clearing the old ones. Fix this by moving the allocation into
      nfs3_proc_setacls().
      
      Also fix an issue discovered by Kevin Rudd, whereby the amount of memory
      reserved for the acls in the xdr_buf->head was miscalculated, and causing
      corruption.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ae46141f
  15. 20 4月, 2008 1 次提交
  16. 20 3月, 2008 1 次提交
    • J
      NFS: clean up short packet handling for NFSv3 readdir · 643f8111
      Jeff Layton 提交于
      Currently, the NFS readdir decoders have a workaround for buggy servers
      that send an empty readdir response with the EOF bit unset. If the
      server sends a malformed response in some cases, this workaround kicks
      in and just returns an empty response rather than returning a proper
      error to the caller.
      
      This patch does 3 things:
      
      1) have malformed responses with no entries return error (-EIO)
      
      2) preserve existing workaround for servers that send empty
         responses with the EOF marker unset.
      
      3) Add some comments to clarify the logic in nfs3_xdr_readdirres().
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      643f8111
  17. 30 1月, 2008 1 次提交
  18. 10 10月, 2007 2 次提交
  19. 20 7月, 2007 1 次提交
  20. 11 7月, 2007 1 次提交
  21. 01 5月, 2007 1 次提交
    • C
      SUNRPC: RPC buffer size estimates are too large · 2bea90d4
      Chuck Lever 提交于
      The RPC buffer size estimation logic in net/sunrpc/clnt.c always
      significantly overestimates the requirements for the buffer size.
      A little instrumentation demonstrated that in fact rpc_malloc was never
      allocating the buffer from the mempool, but almost always called kmalloc.
      
      To compute the size of the RPC buffer more precisely, split p_bufsiz into
      two fields; one for the argument size, and one for the result size.
      
      Then, compute the sum of the exact call and reply header sizes, and split
      the RPC buffer precisely between the two.  That should keep almost all RPC
      buffers within the 2KiB buffer mempool limit.
      
      And, we can finally be rid of RPC_SLACK_SPACE!
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2bea90d4
  22. 21 10月, 2006 2 次提交
  23. 23 9月, 2006 1 次提交
  24. 09 6月, 2006 2 次提交
    • D
      NFS: Split fs/nfs/inode.c · f7b422b1
      David Howells 提交于
      As fs/nfs/inode.c is rather large, heterogenous and unwieldy, the attached
      patch splits it up into a number of files:
      
       (*) fs/nfs/inode.c
      
           Strictly inode specific functions.
      
       (*) fs/nfs/super.c
      
           Superblock management functions for NFS and NFS4, normal access, clones
           and referrals.  The NFS4 superblock functions _could_ move out into a
           separate conditionally compiled file, but it's probably not worth it as
           there're so many common bits.
      
       (*) fs/nfs/namespace.c
      
           Some namespace-specific functions have been moved here.
      
       (*) fs/nfs/nfs4namespace.c
      
           NFS4-specific namespace functions (this could be merged into the previous
           file).  This file is conditionally compiled.
      
       (*) fs/nfs/internal.h
      
           Inter-file declarations, plus a few simple utility functions moved from
           fs/nfs/inode.c.
      
           Additionally, all the in-.c-file externs have been moved here, and those
           files they were moved from now includes this file.
      
      For the most part, the functions have not been changed, only some multiplexor
      functions have changed significantly.
      
      I've also:
      
       (*) Added some extra banner comments above some functions.
      
       (*) Rearranged the function order within the files to be more logical and
           better grouped (IMO), though someone may prefer a different order.
      
       (*) Reduced the number of #ifdefs in .c files.
      
       (*) Added missing __init and __exit directives.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      f7b422b1
    • T
      NFS: Store the file system "fsid" value in the NFS super block. · 8b4bdcf8
      Trond Myklebust 提交于
      This should enable us to detect if we are crossing a mountpoint in the
      case where the server is exporting "nohide" mounts.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      8b4bdcf8
  25. 24 3月, 2006 1 次提交
  26. 21 3月, 2006 1 次提交
  27. 07 1月, 2006 1 次提交
  28. 28 10月, 2005 1 次提交
  29. 23 6月, 2005 1 次提交