1. 10 5月, 2018 1 次提交
    • B
      xfs: defer agfl block frees from deferred ops processing context · 2bc5eba8
      Brian Foster 提交于
      Now that AGFL block frees are deferred when dfops is set in the
      transaction, start deferring AGFL block frees from contexts that are
      known to push the limits of existing log reservations.
      
      The first such context is deferred operation processing itself. This
      primarily targets deferred extent frees (such as file extents and
      inode chunks), but in doing so covers all allocation operations that
      occur in deferred operation processing context.
      
      Update xfs_defer_finish() to set and reset ->t_agfl_dfops across the
      processing sequence. This means that any AGFL block frees due to
      allocation events result in the addition of new EFIs to the dfops
      rather than being processed immediately. xfs_defer_finish() rolls
      the transaction at least once more to process the frees of the AGFL
      blocks back to the allocation btrees and returns once the AGFL is
      rectified.
      Signed-off-by: NBrian Foster <bfoster@redhat.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      2bc5eba8
  2. 15 12月, 2017 1 次提交
  3. 02 9月, 2017 3 次提交
  4. 24 10月, 2016 1 次提交
  5. 19 9月, 2016 1 次提交
    • D
      xfs: defer should allow ->finish_item to request a new transaction · 385d6558
      Darrick J. Wong 提交于
      When xfs_defer_finish calls ->finish_item, it's possible that
      (refcount) won't be able to finish all the work in a single
      transaction.  When this happens, the ->finish_item handler should
      shorten the log done item's list count, update the work item to
      reflect where work should continue, and return -EAGAIN so that
      defer_finish knows to retain the pending item on the pending list,
      roll the transaction, and restart processing where we left off.
      
      Plumb in the code and document how this mechanism is supposed to work.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      385d6558
  6. 30 8月, 2016 1 次提交
    • D
      xfs: track log done items directly in the deferred pending work item · ea78d808
      Darrick J. Wong 提交于
      Christoph reports slab corruption when a deferred refcount update
      aborts during _defer_finish().  The cause of this was broken log item
      state tracking in xfs_defer_pending -- upon an abort,
      _defer_trans_abort() will call abort_intent on all intent items,
      including the ones that have already had a done item attached.
      
      This is incorrect because each intent item has 2 refcount: the first
      is released when the intent item is committed to the log; and the
      second is released when the _done_ item is committed to the log, or
      by the intent creator if there is no done item.  In other words, once
      we log the done item, responsibility for releasing the intent item's
      second refcount is transferred to the done item and /must not/ be
      performed by anything else.
      
      The dfp_committed flag should have been tracking whether or not we had
      a done item so that _defer_trans_abort could decide if it needs to
      abort the intent item, but due to a thinko this was not the case.  Rip
      it out and track the done item directly so that we do the right thing
      w.r.t. intent item freeing.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reported-by: NChristoph Hellwig <hch@infradead.org>
      Reviewed-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      ea78d808
  7. 03 8月, 2016 2 次提交