1. 06 3月, 2010 2 次提交
  2. 10 2月, 2010 1 次提交
  3. 27 1月, 2010 2 次提交
  4. 10 12月, 2009 2 次提交
    • T
      NFS: Fix nfs_migrate_page() · 190f38e5
      Trond Myklebust 提交于
      The call to migrate_page() will cause the page->private field to be
      cleared.
      Also fix up the locking around the page->private transfer, so that we ensure
      that calls to nfs_page_find_request() don't end up racing.
      
      Finally, fix up a double free bug: nfs_unlock_request() already calls
      nfs_release_request() for us...
      Reported-by: NWu Fengguang <fengguang.wu@intel.com>
      Tested-by: NAndi Kleen <andi@firstfloor.org>
      Cc: stable@kernel.org
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      190f38e5
    • C
      vfs: Implement proper O_SYNC semantics · 6b2f3d1f
      Christoph Hellwig 提交于
      While Linux provided an O_SYNC flag basically since day 1, it took until
      Linux 2.4.0-test12pre2 to actually get it implemented for filesystems,
      since that day we had generic_osync_around with only minor changes and the
      great "For now, when the user asks for O_SYNC, we'll actually give
      O_DSYNC" comment.  This patch intends to actually give us real O_SYNC
      semantics in addition to the O_DSYNC semantics.  After Jan's O_SYNC
      patches which are required before this patch it's actually surprisingly
      simple, we just need to figure out when to set the datasync flag to
      vfs_fsync_range and when not.
      
      This patch renames the existing O_SYNC flag to O_DSYNC while keeping it's
      numerical value to keep binary compatibility, and adds a new real O_SYNC
      flag.  To guarantee backwards compatiblity it is defined as expanding to
      both the O_DSYNC and the new additional binary flag (__O_SYNC) to make
      sure we are backwards-compatible when compiled against the new headers.
      
      This also means that all places that don't care about the differences can
      just check O_DSYNC and get the right behaviour for O_SYNC, too - only
      places that actuall care need to check __O_SYNC in addition.  Drivers and
      network filesystems have been updated in a fail safe way to always do the
      full sync magic if O_DSYNC is set.  The few places setting O_SYNC for
      lower layers are kept that way for now to stay failsafe.
      
      We enforce that O_DSYNC is set when __O_SYNC is set early in the open path
      to make sure we always get these sane options.
      
      Note that parisc really screwed up their headers as they already define a
      O_DSYNC that has always been a no-op.  We try to repair it by using it for
      the new O_DSYNC and redefinining O_SYNC to send both the traditional
      O_SYNC numerical value _and_ the O_DSYNC one.
      
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Grant Grundler <grundler@parisc-linux.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andreas Dilger <adilger@sun.com>
      Acked-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Acked-by: NKyle McMartin <kyle@mcmartin.ca>
      Acked-by: NUlrich Drepper <drepper@redhat.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      6b2f3d1f
  5. 07 12月, 2009 1 次提交
  6. 06 12月, 2009 1 次提交
  7. 05 12月, 2009 1 次提交
  8. 03 12月, 2009 1 次提交
  9. 16 9月, 2009 1 次提交
  10. 12 8月, 2009 1 次提交
  11. 10 8月, 2009 1 次提交
  12. 12 7月, 2009 1 次提交
  13. 11 7月, 2009 2 次提交
  14. 18 6月, 2009 4 次提交
  15. 20 3月, 2009 1 次提交
  16. 12 3月, 2009 2 次提交
    • 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
  17. 08 10月, 2008 1 次提交
  18. 16 7月, 2008 1 次提交
    • 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 6 次提交
  20. 24 6月, 2008 1 次提交
  21. 17 5月, 2008 1 次提交
  22. 20 4月, 2008 3 次提交
  23. 20 3月, 2008 2 次提交
    • F
      nfs: nfs_redirty_request · 6d884e8f
      Fred 提交于
      Both flush functions have the same error handling routine.  Pull
      it out as a function.
      Signed-off-by: NFred Isaman <iisaman@citi.umich.edu>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6d884e8f
    • F
      nfs: don't ignore return value from nfs_pageio_add_request · f8512ad0
      Fred Isaman 提交于
      Ignoring the return value from nfs_pageio_add_request can cause deadlocks.
      
      In read path:
        call nfs_pageio_add_request from readpage_async_filler
        assume at this point that there are requests already in desc, that
          can't be merged with the current request.
        so nfs_pageio_doio is fired up to clear out desc.
        assume something goes wrong in setting up the io, so desc->pg_error is set.
        This causes nfs_pageio_add_request to return 0, *WITHOUT* adding the original
          request.
        BUT, since return code is ignored, readpage_async_filler assumes it has
          been added, and does nothing further, leaving page locked.
        do_generic_mapping_read will eventually call lock_page, resulting in deadlock
      
      In write path:
        page is marked dirty by generic_perform_write
        nfs_writepages is called
        call nfs_pageio_add_request from nfs_page_async_flush
        assume at this point that there are requests already in desc, that
          can't be merged with the current request.
        so nfs_pageio_doio is fired up to clear out desc.
        assume something goes wrong in setting up the io, so desc->pg_error is set.
        This causes nfs_page_async_flush to return 0, *WITHOUT* adding the original
          request, yet marking the request as locked (PG_BUSY) and in writeback,
          clearing dirty marks.
        The next time a write is done to the page, deadlock will result as
          nfs_write_end calls nfs_update_request
      Signed-off-by: NFred Isaman <iisaman@citi.umich.edu>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f8512ad0
  24. 08 3月, 2008 1 次提交