1. 01 2月, 2012 1 次提交
    • S
      NFS: DNS resolver cache per network namespace context introduced · 1b340d01
      Stanislav Kinsbursky 提交于
      This patch implements DNS resolver cache creation and registration for each
      alive network namespace context.
      This was done by registering NFS per-net operations, responsible for DNS cache
      allocation/register and unregister/destructioning instead of initialization and
      destruction of static "nfs_dns_resolve" cache detail (this one was removed).
      Pointer to network dns resolver cache is stored in new per-net "nfs_net"
      structure.
      This patch also changes nfs_dns_resolve_name() function prototype (and it's
      calls) by adding network pointer parameter, which is used to get proper DNS
      resolver cache pointer for do_cache_lookup_wait() call.
      
      Note: empty nfs_dns_resolver_init() and nfs_dns_resolver_destroy() functions
      will be used in next patch in the series.
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1b340d01
  2. 13 1月, 2012 1 次提交
  3. 08 1月, 2012 1 次提交
    • T
      NFSv4: Save the owner/group name string when doing open · 6926afd1
      Trond Myklebust 提交于
      ...so that we can do the uid/gid mapping outside the asynchronous RPC
      context.
      This fixes a bug in the current NFSv4 atomic open code where the client
      isn't able to determine what the true uid/gid fields of the file are,
      (because the asynchronous nature of the OPEN call denies it the ability
      to do an upcall) and so fills them with default values, marking the
      inode as needing revalidation.
      Unfortunately, in some cases, the VFS will do some additional sanity
      checks on the file, and may override the server's decision to allow
      the open because it sees the wrong owner/group fields.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6926afd1
  4. 04 1月, 2012 2 次提交
  5. 07 12月, 2011 1 次提交
  6. 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
  7. 02 11月, 2011 2 次提交
  8. 19 10月, 2011 1 次提交
  9. 20 7月, 2011 1 次提交
  10. 15 6月, 2011 2 次提交
  11. 30 5月, 2011 1 次提交
  12. 28 5月, 2011 1 次提交
  13. 25 3月, 2011 1 次提交
  14. 24 3月, 2011 2 次提交
  15. 11 3月, 2011 1 次提交
  16. 26 1月, 2011 1 次提交
  17. 25 1月, 2011 1 次提交
  18. 16 1月, 2011 1 次提交
  19. 07 1月, 2011 3 次提交
    • N
      fs: icache RCU free inodes · fa0d7e3d
      Nick Piggin 提交于
      RCU free the struct inode. This will allow:
      
      - Subsequent store-free path walking patch. The inode must be consulted for
        permissions when walking, so an RCU inode reference is a must.
      - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
        to take i_lock no longer need to take sb_inode_list_lock to walk the list in
        the first place. This will simplify and optimize locking.
      - Could remove some nested trylock loops in dcache code
      - Could potentially simplify things a bit in VM land. Do not need to take the
        page lock to follow page->mapping.
      
      The downsides of this is the performance cost of using RCU. In a simple
      creat/unlink microbenchmark, performance drops by about 10% due to inability to
      reuse cache-hot slab objects. As iterations increase and RCU freeing starts
      kicking over, this increases to about 20%.
      
      In cases where inode lifetimes are longer (ie. many inodes may be allocated
      during the average life span of a single inode), a lot of this cache reuse is
      not applicable, so the regression caused by this patch is smaller.
      
      The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
      however this adds some complexity to list walking and store-free path walking,
      so I prefer to implement this at a later date, if it is shown to be a win in
      real situations. I haven't found a regression in any non-micro benchmark so I
      doubt it will be a problem.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fa0d7e3d
    • F
      pnfs: change how lsegs are removed from layout list · 4541d16c
      Fred Isaman 提交于
      This is to prepare the way for sensible io draining.  Instead of just
      removing the lseg from the list, we instead clear the VALID flag
      (preventing new io from grabbing references to the lseg) and remove
      the reference holding it in the list.  Thus the lseg will be removed
      once any io in progress completes and any references still held are
      dropped.
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4541d16c
    • A
      NFS implement v4.0 callback_ident · f4eecd5d
      Andy Adamson 提交于
      Use the small id to pointer translator service to provide a unique callback
      identifier per SETCLIENTID call used to identify the v4.0 callback service
      associated with the clientid.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f4eecd5d
  20. 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
  21. 25 10月, 2010 1 次提交
  22. 24 10月, 2010 1 次提交
  23. 08 10月, 2010 1 次提交
    • B
      NFS: new idmapper · 955a857e
      Bryan Schumaker 提交于
      This patch creates a new idmapper system that uses the request-key function to
      place a call into userspace to map user and group ids to names.  The old
      idmapper was single threaded, which prevented more than one request from running
      at a single time.  This means that a user would have to wait for an upcall to
      finish before accessing a cached result.
      
      The upcall result is stored on a keyring of type id_resolver.  See the file
      Documentation/filesystems/nfs/idmapper.txt for instructions.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      [Trond: fix up the return value of nfs_idmap_lookup_name and clean up code]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      955a857e
  24. 30 9月, 2010 1 次提交
  25. 24 9月, 2010 1 次提交
  26. 22 9月, 2010 1 次提交
  27. 17 9月, 2010 1 次提交
    • T
      NFSv4: Clean up nfs4_atomic_open · cd9a1c0e
      Trond Myklebust 提交于
      Start moving the 'struct nameidata' dependent code out of the lower level
      NFS code in preparation for the removal of open intents.
      
      Instead of the struct nameidata, we pass down a partially initialised
      struct nfs_open_context that will be fully initialised by the atomic open
      upon success.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      cd9a1c0e
  28. 10 8月, 2010 1 次提交
  29. 04 8月, 2010 1 次提交
  30. 31 7月, 2010 1 次提交
  31. 15 5月, 2010 4 次提交