1. 10 10月, 2008 1 次提交
    • T
      NFS: Fix attribute updates · 03254e65
      Trond Myklebust 提交于
      This fixes a regression seen when running the Connectathon testsuite
      against an ext3 filesystem. The reason was that the inode was constantly
      being marked as 'just updated' by the jiffy wraparound test.
      This again meant that newer GETATTR calls were failing to pass the
      nfs_inode_attrs_need_update() test unless the changes caused a ctime update
      on the server, since they were perceived as having been started before the
      latest inode update.
      
      Given that nfs_inode_attrs_need_update() already checks for wraparound
      of nfsi->last_updated, we can drop the buggy "protection" in
      nfs_update_inode().
      
      Also make a slight micro-optimisation of nfs_inode_attrs_need_update(): we
      are more often going to see time_after(fattr->time_start, nfsi->last_updated)
      be true, rather than seeing an update of ctime/size, so put that test
      first to ensure that we optimise away the ctime/size tests.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      03254e65
  2. 08 10月, 2008 7 次提交
  3. 27 7月, 2008 1 次提交
  4. 16 7月, 2008 2 次提交
    • T
    • T
      NFS: Remove BKL requirement from attribute updates · a3d01454
      Trond Myklebust 提交于
      The main problem is dealing with inode->i_size: we need to set the
      inode->i_lock on all attribute updates, and so vmtruncate won't cut it.
      Make an NFS-private version of vmtruncate that has the necessary locking
      semantics.
      
      The result should be that the following inode attribute updates are
      protected by inode->i_lock
      	nfsi->cache_validity
      	nfsi->read_cache_jiffies
      	nfsi->attrtimeo
      	nfsi->attrtimeo_timestamp
      	nfsi->change_attr
      	nfsi->last_updated
      	nfsi->cache_change_attribute
      	nfsi->access_cache
      	nfsi->access_cache_entry_lru
      	nfsi->access_cache_inode_lru
      	nfsi->acl_access
      	nfsi->acl_default
      	nfsi->nfs_page_tree
      	nfsi->ncommit
      	nfsi->npages
      	nfsi->open_files
      	nfsi->silly_list
      	nfsi->acl
      	nfsi->open_states
      	inode->i_size
      	inode->i_atime
      	inode->i_mtime
      	inode->i_ctime
      	inode->i_nlink
      	inode->i_uid
      	inode->i_gid
      
      The following is protected by dir->i_mutex
      	nfsi->cookieverf
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a3d01454
  5. 10 7月, 2008 2 次提交
  6. 17 5月, 2008 3 次提交
  7. 09 4月, 2008 1 次提交
  8. 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
  9. 08 3月, 2008 1 次提交
  10. 26 2月, 2008 2 次提交
    • T
      NFS: Add an nfsiod workqueue · 5746006f
      Trond Myklebust 提交于
      NFS post-rpciod cleanups often involve tasks that cannot be safely
      performed within the rpciod context (due to deadlock concerns). We
      therefore add a dedicated NFS workqueue that can perform tasks like
      cleaning up state after an interrupted NFSv4 open() call, or calling
      put_nfs_open_context() after an asynchronous read or write call.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5746006f
    • T
      NFS: Fix a deadlock with lazy umount · 383ba719
      Trond Myklebust 提交于
      We can't allow rpc callback functions like task->tk_ops->rpc_call_prepare()
      and task->tk_ops->rpc_call_done() to call mntput() in any way, since
      that will cause a deadlock when the call to rpc_shutdown_client() attempts
      to wait on 'task' to complete.
      
      We can avoid the above deadlock by moving calls to mntput to
      task->tk_ops->rpc_release() callback, since at that time the task will be
      marked as completed, and so rpc_shutdown_client won't attempt to wait on
      it.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      383ba719
  11. 30 1月, 2008 6 次提交
  12. 07 12月, 2007 1 次提交
  13. 20 10月, 2007 2 次提交
  14. 19 10月, 2007 1 次提交
  15. 17 10月, 2007 1 次提交
  16. 10 10月, 2007 8 次提交