1. 01 2月, 2013 1 次提交
  2. 01 11月, 2012 1 次提交
    • W
      NFS: add nfs_sb_deactive_async to avoid deadlock · 324d003b
      Weston Andros Adamson 提交于
      Use nfs_sb_deactive_async instead of nfs_sb_deactive when in a workqueue
      context.  This avoids a deadlock where rpc_shutdown_client loops forever
      in a workqueue kworker context, trying to kill all RPC tasks associated with
      the client, while one or more of these tasks have already been assigned to the
      same kworker (and will never run rpc_exit_task).
      
      This approach is needed because RPC tasks that have already been assigned
      to a kworker by queue_work cannot be canceled, as explained in the comment
      for workqueue.c:insert_wq_barrier.
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      [Trond: add module_get/put.]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      324d003b
  3. 29 6月, 2012 1 次提交
  4. 21 3月, 2012 2 次提交
  5. 12 3月, 2012 1 次提交
    • T
      NFS: Fix a number of sparse warnings · 17280175
      Trond Myklebust 提交于
      Fix a number of "warning: symbol 'foo' was not declared. Should it be
      static?" conditions.
      
      Fix 2 cases of "warning: Using plain integer as NULL pointer"
      
      fs/nfs/delegation.c:263:31: warning: restricted fmode_t degrades to integer
        - We want to allow upgrades to a WRITE delegation, but should otherwise
          consider servers that hand out duplicate delegations to be borken.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      17280175
  6. 01 2月, 2012 1 次提交
  7. 20 10月, 2011 1 次提交
  8. 26 7月, 2011 1 次提交
    • J
      nfs: don't use d_move in nfs_async_rename_done · 73ca1001
      Jeff Layton 提交于
      If the task that initiated the sillyrename ends up being killed by a
      fatal signal, then it will eventually return back to userspace and end
      up releasing the i_mutex. d_move however needs to be done while holding
      the i_mutex.
      
      Instead of using d_move here, just unhash the old and new dentries to
      prevent them from being found by lookups. With this change though, the
      dentries are now incorrect post-rename and do not reflect the actual
      name of the file on the server. I'm proceeding under the assumption
      that since they are unhashed that this isn't really a problem.
      
      In order for the sillydelete to still work though, the dname must be
      copied earlier when setting up the sillydelete info, and the name must
      be recopied if the sillydelete info has to be moved to a new dentry.
      Reported-by: NAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      73ca1001
  9. 16 7月, 2011 1 次提交
  10. 17 3月, 2011 1 次提交
    • A
      nfs: store devname at disconnected NFS roots · b1942c5f
      Al Viro 提交于
      part 2: make sure that disconnected roots have corresponding mnt_devname
      values stashed into them.
      
      Have nfs*_get_root() stuff a copy of devname into ->d_fsdata of the
      found root, provided that it is disconnected.
      
      Have ->d_release() free it when dentry goes away.
      
      Have the places where NFS uses ->d_fsdata for sillyrename (and that
      can *never* happen to a disconnected root - dentry will be attached
      to its parent) free old devname copies if they find those.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b1942c5f
  11. 11 3月, 2011 1 次提交
    • T
      SUNRPC: Close a race in __rpc_wait_for_completion_task() · bf294b41
      Trond Myklebust 提交于
      Although they run as rpciod background tasks, under normal operation
      (i.e. no SIGKILL), functions like nfs_sillyrename(), nfs4_proc_unlck()
      and nfs4_do_close() want to be fully synchronous. This means that when we
      exit, we want all references to the rpc_task to be gone, and we want
      any dentry references etc. held by that task to be released.
      
      For this reason these functions call __rpc_wait_for_completion_task(),
      followed by rpc_put_task() in the expectation that the latter will be
      releasing the last reference to the rpc_task, and thus ensuring that the
      callback_ops->rpc_release() has been called synchronously.
      
      This patch fixes a race which exists due to the fact that
      rpciod calls rpc_complete_task() (in order to wake up the callers of
      __rpc_wait_for_completion_task()) and then subsequently calls
      rpc_put_task() without ensuring that these two steps are done atomically.
      
      In order to avoid adding new spin locks, the patch uses the existing
      waitqueue spin lock to order the rpc_task reference count releases between
      the waiting process and rpciod.
      The common case where nobody is waiting for completion is optimised for by
      checking if the RPC_TASK_ASYNC flag is cleared and/or if the rpc_task
      reference count is 1: in those cases we drop trying to grab the spin lock,
      and immediately free up the rpc_task.
      
      Those few processes that need to put the rpc_task from inside an
      asynchronous context and that do not care about ordering are given a new
      helper: rpc_put_task_async().
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      bf294b41
  12. 07 1月, 2011 1 次提交
  13. 22 12月, 2010 1 次提交
  14. 29 10月, 2010 1 次提交
  15. 24 9月, 2010 1 次提交
  16. 22 9月, 2010 1 次提交
  17. 18 9月, 2010 2 次提交
  18. 23 6月, 2010 1 次提交
  19. 15 5月, 2010 1 次提交
  20. 07 12月, 2009 1 次提交
  21. 06 12月, 2009 1 次提交
  22. 05 12月, 2009 1 次提交
  23. 18 6月, 2009 3 次提交
  24. 07 10月, 2008 1 次提交
  25. 28 7月, 2008 1 次提交
  26. 15 3月, 2008 1 次提交
    • T
      SUNRPC: Add a helper rpcauth_lookup_generic_cred() · 98a8e323
      Trond Myklebust 提交于
      The NFSv4 protocol allows clients to negotiate security protocols on the
      fly in the case where an administrator on the server changes the export
      settings and/or in the case where we may have a filesystem migration event.
      
      Instead of having the NFS client code cache credentials that are tied to a
      particular AUTH method it is therefore preferable to have a generic credential
      that can be converted into whatever AUTH is in use by the RPC client when
      the read/write/sillyrename/... is put on the wire.
      
      We do this by means of the new "generic" credential, which basically just
      caches the minimal information that is needed to look up an RPCSEC_GSS,
      AUTH_SYS, or AUTH_NULL credential.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      98a8e323
  27. 30 1月, 2008 5 次提交
  28. 22 10月, 2007 1 次提交
  29. 20 10月, 2007 2 次提交
  30. 10 10月, 2007 1 次提交
  31. 20 7月, 2007 1 次提交
    • T
      SUNRPC: Clean up the sillyrename code · e4eff1a6
      Trond Myklebust 提交于
      Fix a couple of bugs:
       - Don't rely on the parent dentry still being valid when the call completes.
         Fixes a race with shrink_dcache_for_umount_subtree()
      
       - Don't remove the file if the filehandle has been labelled as stale.
      
      Fix a couple of inefficiencies
       - Remove the global list of sillyrenamed files. Instead we can cache the
         sillyrename information in the dentry->d_fsdata
       - Move common code from unlink_setup/unlink_done into fs/nfs/unlink.c
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      e4eff1a6