1. 02 10月, 2012 1 次提交
    • W
      NFSv4: Add ACCESS operation to OPEN compound · 6168f62c
      Weston Andros Adamson 提交于
      The OPEN operation has no way to differentiate an open for read and an
      open for execution - both look like read to the server. This allowed
      users to read files that didn't have READ access but did have EXEC access,
      which is obviously wrong.
      
      This patch adds an ACCESS call to the OPEN compound to handle the
      difference between OPENs for reading and execution.  Since we're going
      through the trouble of calling ACCESS, we check all possible access bits
      and cache the results hopefully avoiding an ACCESS call in the future.
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6168f62c
  2. 29 9月, 2012 2 次提交
  3. 05 9月, 2012 1 次提交
  4. 01 8月, 2012 1 次提交
    • M
      nfs: enable swap on NFS · a564b8f0
      Mel Gorman 提交于
      Implement the new swapfile a_ops for NFS and hook up ->direct_IO.  This
      will set the NFS socket to SOCK_MEMALLOC and run socket reconnect under
      PF_MEMALLOC as well as reset SOCK_MEMALLOC before engaging the protocol
      ->connect() method.
      
      PF_MEMALLOC should allow the allocation of struct socket and related
      objects and the early (re)setting of SOCK_MEMALLOC should allow us to
      receive the packets required for the TCP connection buildup.
      
      [jlayton@redhat.com: Restore PF_MEMALLOC task flags in all cases]
      [dfeng@redhat.com: Fix handling of multiple swap files]
      [a.p.zijlstra@chello.nl: Original patch]
      Signed-off-by: NMel Gorman <mgorman@suse.de>
      Acked-by: NRik van Riel <riel@redhat.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Eric B Munson <emunson@mgebm.net>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Xiaotian Feng <dfeng@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a564b8f0
  5. 31 7月, 2012 1 次提交
  6. 18 7月, 2012 2 次提交
  7. 25 5月, 2012 2 次提交
  8. 23 5月, 2012 1 次提交
  9. 02 5月, 2012 1 次提交
    • T
      NFS: Adapt readdirplus to application usage patterns · d69ee9b8
      Trond Myklebust 提交于
      While the use of READDIRPLUS is significantly more efficient than
      READDIR followed by many LOOKUP calls, it is still less efficient
      than just READDIR if the attributes are not required.
      
      This patch tracks when lookups are attempted on the directory,
      and uses that information to selectively disable READDIRPLUS
      on that directory.
      The first 'readdir' call is always served using READDIRPLUS.
      Subsequent calls only use READDIRPLUS if there was a successful
      lookup or revalidation on a child in the mean time.
      
      Credit for the original idea should go to Neil Brown. See:
            http://www.spinics.net/lists/linux-nfs/msg19996.html
      However, the implementation in this patch differs from Neil's
      in that it focuses on tracking lookups rather than calls to
      stat().
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Neil Brown <neilb@suse.de>
      d69ee9b8
  10. 28 4月, 2012 3 次提交
  11. 21 3月, 2012 3 次提交
  12. 11 3月, 2012 1 次提交
  13. 07 3月, 2012 1 次提交
  14. 03 3月, 2012 1 次提交
  15. 04 1月, 2012 1 次提交
  16. 05 11月, 2011 1 次提交
    • J
      nfs: when attempting to open a directory, fall back on normal lookup (try #5) · 1788ea6e
      Jeff Layton 提交于
      commit d953126a changed how nfs_atomic_lookup handles an -EISDIR return
      from an OPEN call. Prior to that patch, that caused the client to fall
      back to doing a normal lookup. When that patch went in, the code began
      returning that error to userspace. The d_revalidate codepath however
      never had the corresponding change, so it was still possible to end up
      with a NULL ctx->state pointer after that.
      
      That patch caused a regression. When we attempt to open a directory that
      does not have a cached dentry, that open now errors out with EISDIR. If
      you attempt the same open with a cached dentry, it will succeed.
      
      Fix this by reverting the change in nfs_atomic_lookup and allowing
      attempts to open directories to fall back to a normal lookup
      
      Also, add a NFSv4-specific f_ops->open routine that just returns
      -ENOTDIR. This should never be called if things are working properly,
      but if it ever is, then the dprintk may help in debugging.
      
      To facilitate this, a new file_operations field is also added to the
      nfs_rpc_ops struct.
      
      Cc: stable@kernel.org
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1788ea6e
  17. 31 10月, 2011 1 次提交
  18. 19 10月, 2011 1 次提交
  19. 01 8月, 2011 1 次提交
  20. 31 7月, 2011 1 次提交
  21. 20 7月, 2011 2 次提交
  22. 24 3月, 2011 5 次提交
  23. 22 3月, 2011 1 次提交
  24. 12 3月, 2011 1 次提交
  25. 16 1月, 2011 1 次提交
  26. 07 1月, 2011 1 次提交
  27. 02 12月, 2010 1 次提交
    • T
      NFS: Fix a memory leak in nfs_readdir · 11de3b11
      Trond Myklebust 提交于
      We need to ensure that the entries in the nfs_cache_array get cleared
      when the page is removed from the page cache. To do so, we use the
      freepage address_space operation.
      
      Change nfs_readdir_clear_array to use kmap_atomic(), so that the
      function can be safely called from all contexts.
      
      Finally, modify the cache_page_release helper to call
      nfs_readdir_clear_array directly, when dealing with an anonymous
      page from 'uncached_readdir'.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      11de3b11
  28. 17 11月, 2010 1 次提交