1. 06 3月, 2010 5 次提交
  2. 04 3月, 2010 1 次提交
  3. 03 2月, 2010 1 次提交
  4. 24 9月, 2009 1 次提交
  5. 20 8月, 2009 1 次提交
  6. 10 8月, 2009 1 次提交
    • T
      NFSv4: Add 'server capability' flags for NFSv4 recommended attributes · 62ab460c
      Trond Myklebust 提交于
      If the NFSv4 server doesn't support a POSIX attribute, the generic NFS code
      needs to know that, so that it don't keep trying to poll for it.
      
      However, by the same count, if the NFSv4 server does support that
      attribute, then we should ensure that the inode metadata is appropriately
      labelled as being untrusted. For instance, if we don't know the correct
      value of the file's uid, we should certainly not be caching ACLs or ACCESS
      results.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      62ab460c
  7. 13 7月, 2009 1 次提交
  8. 03 4月, 2009 2 次提交
  9. 20 3月, 2009 1 次提交
    • T
      NFS: Optimise NFS close() · 7fe5c398
      Trond Myklebust 提交于
      Close-to-open cache consistency rules really only require us to flush out
      writes on calls to close(), and require us to revalidate attributes on the
      very last close of the file.
      
      Currently we appear to be doing a lot of extra attribute revalidation
      and cache flushes.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      7fe5c398
  10. 12 3月, 2009 5 次提交
    • T
      NFS: Throttle page dirtying while we're flushing to disk · 72cb77f4
      Trond Myklebust 提交于
      The following patch is a combination of a patch by myself and Peter
      Staubach.
      
      Trond: If we allow other processes to dirty pages while a process is doing
      a consistency sync to disk, we can end up never making progress.
      
      Peter: Attached is a patch which addresses a continuing problem with
      the NFS client generating out of order WRITE requests.  While
      this is compliant with all of the current protocol
      specifications, there are servers in the market which can not
      handle out of order WRITE requests very well.  Also, this may
      lead to sub-optimal block allocations in the underlying file
      system on the server.  This may cause the read throughputs to
      be reduced when reading the file from the server.
      
      Peter: There has been a lot of work recently done to address out of
      order issues on a systemic level.  However, the NFS client is
      still susceptible to the problem.  Out of order WRITE
      requests can occur when pdflush is in the middle of writing
      out pages while the process dirtying the pages calls
      generic_file_buffered_write which calls
      generic_perform_write which calls
      balance_dirty_pages_rate_limited which ends up calling
      writeback_inodes which ends up calling back into the NFS
      client to writes out dirty pages for the same file that
      pdflush happens to be working with.
      Signed-off-by: NPeter Staubach <staubach@redhat.com>
      [modification by Trond to merge the two similar patches]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      72cb77f4
    • T
      fb8a1f11
    • T
      NFSv4: Support NFSv4 optional attributes in the struct nfs_fattr · 9e6e70f8
      Trond Myklebust 提交于
      Currently, filling struct nfs_fattr is more or less an all or nothing
      operation, since NFSv2 and NFSv3 have only mandatory attributes.
      In NFSv4, some attributes are optional, and so we may simply not be able to
      fill in those fields. Furthermore, NFSv4 allows you to specify which
      attributes you are interested in retrieving, thus permitting you to
      optimise away retrieval of attributes that you know will no change...
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      9e6e70f8
    • N
      NFS: flush cached directory information slightly more readily. · 37d9d76d
      NeilBrown 提交于
      If cached directory contents becomes incorrect, there is no way to
      flush the contents.  This contrasts with files where file locking is
      the recommended way to ensure cache consistency between multiple
      applications (a read-lock always flushes the cache).
      
      Also while changes to files often change the size of the file (thus
      triggering a cache flush), changes to directories often do not change
      the apparent size (as the size is often rounded to a block size).
      
      So it is particularly important with directories to avoid the
      possibility of an incorrect cache wherever possible.
      
      When the link count on a directory changes it implies a change in the
      number of child directories, and so a change in the contents of this
      directory.  So use that as a trigger to flush cached contents.
      
      When the ctime changes but the mtime does not, there are two possible
      reasons.
       1/ The owner/mode information has been changed.
       2/ utimes has been used to set the mtime backwards.
      
      In the first case, a data-cache flush is not required.
      In the second case it is.
      
      So on the basis that correctness trumps performance, flush the
      directory contents cache in this case also.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      37d9d76d
    • S
      NFS: Minor __nfs_revalidate_inode cleanup · 2b57dc6c
      Suresh Jayaraman 提交于
      Remove redundant NFS_STALE() check, a leftover due to the commit
      691beb13Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2b57dc6c
  11. 24 12月, 2008 2 次提交
    • P
      optimize attribute timeouts for "noac" and "actimeo=0" · 64672d55
      Peter Staubach 提交于
      Hi.
      
      I've been looking at a bugzilla which describes a problem where
      a customer was advised to use either the "noac" or "actimeo=0"
      mount options to solve a consistency problem that they were
      seeing in the file attributes.  It turned out that this solution
      did not work reliably for them because sometimes, the local
      attribute cache was believed to be valid and not timed out.
      (With an attribute cache timeout of 0, the cache should always
      appear to be timed out.)
      
      In looking at this situation, it appears to me that the problem
      is that the attribute cache timeout code has an off-by-one
      error in it.  It is assuming that the cache is valid in the
      region, [read_cache_jiffies, read_cache_jiffies + attrtimeo].  The
      cache should be considered valid only in the region,
      [read_cache_jiffies, read_cache_jiffies + attrtimeo).  With this
      change, the options, "noac" and "actimeo=0", work as originally
      expected.
      
      This problem was previously addressed by special casing the
      attrtimeo == 0 case.  However, since the problem is only an off-
      by-one error, the cleaner solution is address the off-by-one
      error and thus, not require the special case.
      
          Thanx...
      
              ps
      Signed-off-by: NPeter Staubach <staubach@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      64672d55
    • T
      dc0b027d
  12. 29 10月, 2008 1 次提交
  13. 27 10月, 2008 1 次提交
  14. 15 10月, 2008 3 次提交
  15. 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
  16. 08 10月, 2008 7 次提交
  17. 27 7月, 2008 1 次提交
  18. 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
  19. 10 7月, 2008 2 次提交
  20. 17 5月, 2008 1 次提交