1. 08 6月, 2009 6 次提交
  2. 07 4月, 2009 3 次提交
    • D
      xfs: block callers of xfs_flush_inodes() correctly · e43afd72
      Dave Chinner 提交于
      xfs_flush_inodes() currently uses a magic timeout to wait for
      some inodes to be flushed before returning. This isn't
      really reliable but used to be the best that could be done
      due to deadlock potential of waiting for the entire flush.
      
      Now the inode flush is safe to execute while we hold page
      and inode locks, we can wait for all the inodes to flush
      synchronously. Convert the wait mechanism to a completion
      to do this efficiently. This should remove all remaining
      spurious ENOSPC errors from the delayed allocation reservation
      path.
      
      This is extracted almost line for line from a larger patch
      from Mikulas Patocka.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      e43afd72
    • D
      xfs: make inode flush at ENOSPC synchronous · 5825294e
      Dave Chinner 提交于
      When we are writing to a single file and hit ENOSPC, we trigger a background
      flush of the inode and try again.  Because we hold page locks and the iolock,
      the flush won't proceed until after we release these locks. This occurs once
      we've given up and ENOSPC has been reported. Hence if this one is the only
      dirty inode in the system, we'll get an ENOSPC prematurely.
      
      To fix this, remove the async flush from the allocation routines and move
      it to the top of the write path where we can do a synchronous flush
      and retry the write again. Only retry once as a second ENOSPC indicates
      that we really are ENOSPC.
      
      This avoids a page cache deadlock when trying to do this flush synchronously
      in the allocation layer that was identified by Mikulas Patocka.
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      5825294e
    • D
      xfs: use xfs_sync_inodes() for device flushing · a8d770d9
      Dave Chinner 提交于
      Currently xfs_device_flush calls sync_blockdev() which is
      a no-op for XFS as all it's metadata is held in a different
      address to the one sync_blockdev() works on.
      
      Call xfs_sync_inodes() instead to flush all the delayed
      allocation blocks out. To do this as efficiently as possible,
      do it via two passes - one to do an async flush of all the
      dirty blocks and a second to wait for all the IO to complete.
      This requires some modification to the xfs-sync_inodes_ag()
      flush code to do efficiently.
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      a8d770d9
  3. 04 2月, 2009 1 次提交
  4. 28 1月, 2009 1 次提交
  5. 05 12月, 2008 1 次提交
    • L
      [XFS] Remove unnecessary assertion · 797eaed4
      Lachlan McIlroy 提交于
      Hit this assert because an inode was tagged with XFS_ICI_RECLAIM_TAG but
      not XFS_IRECLAIMABLE|XFS_IRECLAIM.  This is because xfs_iget_cache_hit()
      first clears XFS_IRECLAIMABLE and then calls __xfs_inode_clear_reclaim_tag()
      while only holding the pag_ici_lock in read mode so we can race with
      xfs_reclaim_inodes_ag().  Looks like xfs_reclaim_inodes_ag() will do the
      right thing anyway so just remove the assert.
      
      Thanks to Christoph for pointing out where the problem was.
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Reviewed-by: NChristoph Hellwig <hch@infradead.org>
      797eaed4
  6. 04 12月, 2008 1 次提交
  7. 10 11月, 2008 1 次提交
  8. 30 10月, 2008 21 次提交
  9. 13 8月, 2008 4 次提交
  10. 28 7月, 2008 1 次提交
    • C
      [XFS] streamline init/exit path · 9f8868ff
      Christoph Hellwig 提交于
      Currently the xfs module init/exit code is a mess. It's farmed out over a
      lot of function with very little error checking. This patch makes sure we
      propagate all initialization failures properly and clean up after them.
      Various runtime initializations are replaced with compile-time
      initializations where possible to make this easier. The exit path is
      similarly consolidated.
      
      There's now split out function to create/destroy the kmem zones and
      alloc/free the trace buffers. I've also changed the ktrace allocations to
      KM_MAYFAIL and handled errors resulting from that.
      
      And yes, we really should replace the XFS_*_TRACE ifdefs with a single
      XFS_TRACE..
      
      SGI-PV: 976035
      
      SGI-Modid: xfs-linux-melb:xfs-kern:31354a
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NNiv Sardi <xaiki@sgi.com>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      9f8868ff