1. 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
  2. 07 1月, 2011 1 次提交
  3. 22 12月, 2010 1 次提交
  4. 29 10月, 2010 1 次提交
  5. 24 9月, 2010 1 次提交
  6. 22 9月, 2010 1 次提交
  7. 18 9月, 2010 2 次提交
  8. 23 6月, 2010 1 次提交
  9. 15 5月, 2010 1 次提交
  10. 07 12月, 2009 1 次提交
  11. 06 12月, 2009 1 次提交
  12. 05 12月, 2009 1 次提交
  13. 18 6月, 2009 3 次提交
  14. 07 10月, 2008 1 次提交
  15. 28 7月, 2008 1 次提交
  16. 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
  17. 30 1月, 2008 5 次提交
  18. 22 10月, 2007 1 次提交
  19. 20 10月, 2007 2 次提交
  20. 10 10月, 2007 1 次提交
  21. 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
  22. 21 3月, 2006 1 次提交
  23. 07 1月, 2006 2 次提交
  24. 07 11月, 2005 1 次提交
  25. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4