1. 17 8月, 2016 2 次提交
    • C
      xfs: fix bogus space reservation in xfs_iomap_write_allocate · 0af32fb4
      Christoph Hellwig 提交于
      The space reservations was without an explaination in commit
      
          "Add error reporting calls in error paths that return EFSCORRUPTED"
      
      back in 2003.  There is no reason to reserve disk blocks in the
      transaction when allocating blocks for delalloc space as we already
      reserved the space when creating the delalloc extent.
      
      With this fix we stop running out of the reserved pool in
      generic/229, which has happened for long time with small blocksize
      file systems, and has increased in severity with the new buffered
      write path.
      
      [ dchinner: we still need to pass the block reservation into
        xfs_bmapi_write() to ensure we don't deadlock during AG selection.
        See commit dbd5c8c9 ("xfs: pass total block res. as total
        xfs_bmapi_write() parameter") for more details on why this is
        necessary. ]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      
      0af32fb4
    • B
      xfs: don't assert fail on non-async buffers on ioacct decrement · 4dd3fd71
      Brian Foster 提交于
      The buffer I/O accounting mechanism tracks async buffers under I/O.  As
      an optimization, the buffer I/O count is incremented only once on the
      first async I/O for a given hold cycle of a buffer and decremented once
      the buffer is released to the LRU (or freed).
      
      xfs_buf_ioacct_dec() has an ASSERT() check for an XBF_ASYNC buffer, but
      we have one or two corner cases where a buffer can be submitted for I/O
      multiple times via different methods in a single hold cycle. If an async
      I/O occurs first, the I/O count is incremented. If a sync I/O occurs
      before the hold count drops, XBF_ASYNC is cleared by the time the I/O
      count is decremented.
      
      Remove the async assert check from xfs_buf_ioacct_dec() as this is a
      perfectly valid scenario. For the purposes of I/O accounting, we really
      only care about the buffer async state at I/O submission time.
      Discovered-and-analyzed-by: NDave Chinner <david@fromorbit.com>
      Signed-off-by: NBrian Foster <bfoster@redhat.com>
      Reviewed-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      
      4dd3fd71
  2. 07 8月, 2016 1 次提交
  3. 03 8月, 2016 37 次提交