This tests validates the correct extent layout for some hairy reflink related issues. But until we called sync or fsync we have no gurantee of any data fork layout, as only writeback moves the extents from the COW for to the data fork. Without this we'll see an error if we use COW fork speculative preallocations for non-overwrites, which is useful to reduce fragmentation. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- tests/xfs/420 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/xfs/420 b/tests/xfs/420 index a083a12b..aea95c7b 100755 --- a/tests/xfs/420 +++ b/tests/xfs/420 @@ -93,6 +93,8 @@ $XFS_IO_PROG -c "pwrite -S 0x63 $((blksz * 3)) $blksz" $testdir/file2 >> $seqres $XFS_IO_PROG -c "pwrite -S 0x63 0 $blksz" $testdir/file3 >> $seqres.full $XFS_IO_PROG -c "pwrite -S 0x63 $((blksz * 3)) $blksz" $testdir/file3 >> $seqres.full +sync + $XFS_IO_PROG -c "bmap -ev" -c "bmap -cv" $testdir/file1 >> $seqres.full 2>&1 $XFS_IO_PROG -c "bmap -ev" -c "bmap -cv" $testdir/file2 >> $seqres.full 2>&1 $XFS_IO_PROG -c "bmap -ev" -c "bmap -cv" $testdir/file3 >> $seqres.full 2>&1 -- 2.19.1