1. 19 10月, 2011 4 次提交
    • P
      pnfs: recoalesce when ld write pagelist fails · 8ce160c5
      Peng Tao 提交于
      For pnfs pagelist write failure, we need to pg_recoalesce and resend IO to
      mds.
      Signed-off-by: NPeng Tao <peng_tao@emc.com>
      Signed-off-by: NJim Rees <rees@umich.edu>
      Cc: stable@kernel.org [3.0]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      8ce160c5
    • J
      nfs: don't try to migrate pages with active requests · 2da95652
      Jeff Layton 提交于
      nfs_find_and_lock_request will take a reference to the nfs_page and
      will then put it if the req is already locked. It's possible though
      that the reference will be the last one. That put then can kick off
      a whole series of reference puts:
      
      nfs_page
         nfs_open_context
            dentry
                inode
      
      If the inode ends up being deleted, then the VFS will call
      truncate_inode_pages. That function will try to take the page lock, but
      it was already locked when migrate_page was called. The code
      deadlocks.
      
      Fix this by simply refusing the migration request if PagePrivate is
      already set, indicating that the page is already associated with an
      active read or write request.
      
      We've had a customer test a backported version of this patch and
      the preliminary results seem good.
      
      Cc: stable@kernel.org
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Reported-by: NHarshula Jayasuriya <harshula@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2da95652
    • J
      nfs: don't redirty inode when ncommit == 0 in nfs_commit_unstable_pages · 3236c3e1
      Jeff Layton 提交于
      commit 420e3646 allowed the kernel to reduce the number of unnecessary
      commit calls by skipping the commit when there are a large number of
      outstanding pages.
      
      However, the current test in nfs_commit_unstable_pages does not handle
      the edge condition properly. When ncommit == 0, then that means that the
      kernel doesn't need to do anything more for the inode. The current test
      though in the WB_SYNC_NONE case will return true, and the inode will end
      up being marked dirty. Once that happens the inode will never be clean
      until there's a WB_SYNC_ALL flush.
      
      Fix this by immediately returning from nfs_commit_unstable_pages when
      ncommit == 0.
      
      Mike noticed this problem initially in RHEL5 (2.6.18-based kernel) which
      has a backported version of 420e3646. The inode cache there was growing
      very large. The inode cache was unable to be shrunk since the inodes
      were all marked dirty. Calling sync() would essentially "fix" the
      problem -- the WB_SYNC_ALL flush would result in the inodes all being
      marked clean.
      
      What I'm not clear on is how big a problem this is in mainline kernels
      as the writeback code there is very different. Either way, it seems
      incorrect to re-mark the inode dirty in this case.
      Reported-by: NMike McLean <mikem@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Cc: stable@kernel.org [2.6.34+]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      3236c3e1
    • T
      Revert "NFS: Ensure that writeback_single_inode() calls write_inode() when syncing" · 59b7c05f
      Trond Myklebust 提交于
      This reverts commit b80c3cb6.
      
      The reverted commit was rendered obsolete by a VFS fix: commit
      5547e8aa (writeback: Update dirty flags in
      two steps). We now no longer need to worry about writeback_single_inode()
      missing our marking the inode for COMMIT in 'do_writepages()' call.
      
      Reverting this patch, fixes a performance regression in which the inode
      would continuously get queued to the dirty list, causing the writeback
      code to unnecessarily try to send a COMMIT.
      
      Signed-off-by: Trond Myklebust <Trond.Myklebust>
      Tested-by: NSimon Kirby <sim@hostway.ca>
      Cc: stable@kernel.org [2.6.35+]
      59b7c05f
  2. 14 9月, 2011 1 次提交
  3. 20 7月, 2011 1 次提交
  4. 15 7月, 2011 6 次提交
  5. 13 7月, 2011 6 次提交
  6. 29 6月, 2011 1 次提交
  7. 08 6月, 2011 1 次提交
  8. 30 5月, 2011 2 次提交
    • B
      NFSv4.1: unify pnfs_pageio_init functions · dfed206b
      Benny Halevy 提交于
      Use common code for pnfs_pageio_init_{read,write} and use
      a common generic pg_test function.
      
      Note that this function always assumes the the layout driver's
      pg_test method is implemented.
      
      [Fix BUG]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      dfed206b
    • B
      pnfs: Use byte-range for layoutget · fb3296eb
      Benny Halevy 提交于
      Add offset and count parameters to pnfs_update_layout and use them to get
      the layout in the pageio path.
      
      Order cache layout segments in the following order:
      * offset (ascending)
      * length (descending)
      * iomode (RW before READ)
      
      Test byte range against the layout segment in use in pnfs_{read,write}_pg_test
      so not to coalesce pages not using the same layout segment.
      
      [fix lseg ordering]
      [clean up pnfs_find_lseg lseg arg]
      [remove unnecessary FIXME]
      [fix ordering in pnfs_insert_layout]
      [clean up pnfs_insert_layout]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      fb3296eb
  9. 12 5月, 2011 1 次提交
  10. 13 4月, 2011 3 次提交
  11. 27 3月, 2011 1 次提交
    • T
      NFS: Fix a hang in the writeback path · 4d65c520
      Trond Myklebust 提交于
      Now that the inode scalability patches have been merged, it is no longer
      safe to call igrab() under the inode->i_lock.
      Now that we no longer call nfs_clear_request() until the nfs_page is
      being freed, we know that we are always holding a reference to the
      nfs_open_context, which again holds a reference to the path, and so
      the inode cannot be freed until the last nfs_page has been removed
      from the radix tree and freed.
      
      We can therefore skip the igrab()/iput() altogether.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4d65c520
  12. 25 3月, 2011 1 次提交
  13. 24 3月, 2011 8 次提交
  14. 22 3月, 2011 2 次提交
  15. 12 3月, 2011 2 次提交