1. 12 Jul, 2013 1 commit
    • Colin Cross's avatar
      freezer: add unsafe versions of freezable helpers for NFS · ac88fa16
      Colin Cross authored
      
      NFS calls the freezable helpers with locks held, which is unsafe
      and will cause lockdep warnings when 6aa9707 "lockdep: check
      that no locks held at freeze time" is reapplied (it was reverted
      in dbf520a).  NFS shouldn't be doing this, but it has
      long-running syscalls that must hold a lock but also shouldn't
      block suspend.  Until NFS freeze handling is rewritten to use a
      signal to exit out of the critical section, add new *_unsafe
      versions of the helpers that will not run the lockdep test when
      6aa9707 is reapplied, and call them from NFS.
      
      In practice the likley result of holding the lock while freezing
      is that a second task blocked on the lock will never freeze,
      aborting suspend, but it is possible to manufacture a case using
      the cgroup freezer, the lock, and the suspend freezer to create
      a deadlock.  Silencing the lockdep warning here will allow
      problems to be found in other drivers that may have a more
      serious deadlock risk, and prevent new problems from being added.
      
      Change-Id: Ia17d32cdd013a6517bdd5759da900970a4427170
      Signed-off-by: default avatarColin Cross <ccross@android.com>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ac88fa16
  2. 28 Mar, 2012 1 commit
  3. 20 Mar, 2012 1 commit
  4. 10 Mar, 2012 1 commit
  5. 07 Mar, 2012 2 commits
  6. 06 Mar, 2012 1 commit
  7. 02 Mar, 2012 1 commit
  8. 06 Feb, 2012 3 commits
  9. 01 Feb, 2012 2 commits
  10. 31 Jan, 2012 2 commits
    • Stanislav Kinsbursky's avatar
      NFS: blocklayout pipe creation per network namespace context introduced · 9e2e74db
      Stanislav Kinsbursky authored
      
      This patch implements blocklayout pipe creation and registration per each
      existent network namespace.
      This was achived by registering NFS per-net operations, responsible for
      blocklayout pipe allocation/register and unregister/destruction instead of
      initialization and destruction of static "bl_device_pipe" pipe (this one was
      removed).
      Note, than pointer to network blocklayout pipe is stored in per-net "nfs_net"
      structure, because allocating of one more per-net structure for blocklayout
      module looks redundant.
      This patch also changes dev_remove() function prototype (and all it's callers,
      where it' requied) by adding network namespace pointer parameter, which is used
      to discover proper blocklayout pipe for rpc_queue_upcall() call.
      Signed-off-by: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      9e2e74db
    • Stanislav Kinsbursky's avatar
      NFS: DNS resolver cache per network namespace context introduced · 1b340d01
      Stanislav Kinsbursky authored
      
      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: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      1b340d01
  11. 12 Jan, 2012 1 commit
  12. 07 Jan, 2012 1 commit
    • Trond Myklebust's avatar
      NFSv4: Save the owner/group name string when doing open · 6926afd1
      Trond Myklebust authored
      
      ...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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      6926afd1
  13. 04 Jan, 2012 2 commits
  14. 06 Dec, 2011 1 commit
  15. 04 Nov, 2011 1 commit
    • Jeff Layton's avatar
      nfs: when attempting to open a directory, fall back on normal lookup (try #5) · 1788ea6e
      Jeff Layton authored
      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: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      1788ea6e
  16. 02 Nov, 2011 2 commits
  17. 18 Oct, 2011 1 commit
  18. 20 Jul, 2011 1 commit
  19. 15 Jun, 2011 2 commits
  20. 29 May, 2011 1 commit
  21. 27 May, 2011 1 commit
  22. 24 Mar, 2011 1 commit
  23. 23 Mar, 2011 2 commits
  24. 10 Mar, 2011 1 commit
  25. 25 Jan, 2011 2 commits
  26. 16 Jan, 2011 1 commit
  27. 07 Jan, 2011 1 commit
    • Nick Piggin's avatar
      fs: icache RCU free inodes · fa0d7e3d
      Nick Piggin authored
      
      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: default avatarNick Piggin <npiggin@kernel.dk>
      fa0d7e3d
  28. 06 Jan, 2011 2 commits
  29. 02 Dec, 2010 1 commit
    • Trond Myklebust's avatar
      NFS: Fix a memory leak in nfs_readdir · 11de3b11
      Trond Myklebust authored
      
      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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      11de3b11