• D
    xfs: flush both inodes in xfs_swap_extents · 4ef897a2
    Dave Chinner 提交于
    We need to treat both inodes identically from a page cache point of
    view when prepareing them for extent swapping. We don't do this
    right now - we assume that one of the inodes empty, because that's
    what xfs_fsr currently does. Remove this assumption from the code.
    
    While factoring out the flushing and related checks, move the
    transactions reservation to immeidately after the flushes so that we
    don't need to pick up and then drop the ilock to do the transaction
    reservation. There are no issues with aborting the transaction it if
    the checks fail before we join the inodes to the transaction and
    dirty them, so this is a safe change to make.
    Signed-off-by: NDave Chinner <dchinner@redhat.com>
    Reviewed-by: NChristoph Hellwig <hch@lst.de>
    Signed-off-by: NDave Chinner <david@fromorbit.com>
    4ef897a2
xfs_bmap_util.c 51.9 KB