xfs: remove the post-EOF prealloc tests from the auto and quick groups
PATCH 1/1 xfs: remove the post-EOF prealloc tests from the auto and quick groups
These fail for various non-default configs like DAX, alwayscow and small block sizes.
--- tests/xfs/629 | 2 +- tests/xfs/630 | 2 +- tests/xfs/631 | 2 +- tests/xfs/632 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
tests/xfs/629 +1 -1
@@ -8,7 +8,7 @@ # . ./common/preamble -_begin_fstest auto quick prealloc rw +_begin_fstest prealloc rw . ./common/filter
tests/xfs/630 +1 -1
@@ -8,7 +8,7 @@ # . ./common/preamble -_begin_fstest auto quick prealloc rw +_begin_fstest prealloc rw . ./common/filter
tests/xfs/631 +1 -1
@@ -8,7 +8,7 @@ # . ./common/preamble -_begin_fstest auto quick prealloc rw +_begin_fstest prealloc rw . ./common/filter
tests/xfs/632 +1 -1
@@ -9,7 +9,7 @@ # . ./common/preamble -_begin_fstest auto prealloc rw +_begin_fstest prealloc rw . ./common/filter
Signature · 1 line
2.45.2
Quoted 2 lines · Christoph Hellwig
These fail for various non-default configs like DAX, alwayscow and small block sizes.
Shouldn't we selectively _notrun these tests for configurations where speculative/delayed allocations don't work?
I had started on a helper to try to detect the situations where the tests cannot ever pass, but never quite finished it:
common/xfs +31 -0
@@ -2238,3 +2238,34 @@ _scratch_xfs_scrubbed() { $XFS_SCRUBBED_PROG "${scrubbed_args[@]}" "$@" $SCRATCH_MNT } + +# Will this filesystem create speculative post-EOF preallocations for a file? +_require_speculative_prealloc() +{ + local file="$1" + local tries + local overage + + # Now that we have background garbage collection processes that can be + # triggered by low space/quota conditions, it's possible that we won't + # succeed in creating a speculative preallocation on the first try. + for ((tries = 0; tries < 5; tries++)); do + rm -f $file + + # a few file extending open-write-close cycles should be enough + # to trigger the fs to retain preallocation. write 256k in 32k + # intervals to be sure + for i in $(seq 0 32768 262144); do + $XFS_IO_PROG -f -c "pwrite $i 32k" $file >> $seqres.full + + # Do we have more blocks allocated than what we've + # written so far? + overage="$(stat -c '%b * %B - %s' $file | bc)" + test "$overage" -gt 0 && return 0 + done + done + + _notrun "Warning: No speculative preallocation for $file after " \ + "$tries iterations." \ + "Check use of the allocsize= mount option." +}
--D
Quoted 64 lines
Signed-off-by Christoph Hellwig <[email protected]>--- tests/xfs/629 | 2 +- tests/xfs/630 | 2 +- tests/xfs/631 | 2 +- tests/xfs/632 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)tests/xfs/629 +1
-1@@ -8,7 +8,7 @@ # . ./common/preamble -_begin_fstest auto quick prealloc rw +_begin_fstest prealloc rw . ./common/filtertests/xfs/630 +1
-1@@ -8,7 +8,7 @@ # . ./common/preamble -_begin_fstest auto quick prealloc rw +_begin_fstest prealloc rw . ./common/filtertests/xfs/631 +1
-1@@ -8,7 +8,7 @@ # . ./common/preamble -_begin_fstest auto quick prealloc rw +_begin_fstest prealloc rw . ./common/filtertests/xfs/632 +1
-1@@ -9,7 +9,7 @@ # . ./common/preamble -_begin_fstest auto prealloc rw +_begin_fstest prealloc rw . ./common/filterSignature · 1 line
2.45.2
Quoted 6 lines · Darrick J. Wong
Quoted 2 lines · Christoph Hellwig
These fail for various non-default configs like DAX, alwayscow and small block sizes.
Shouldn't we selectively
_notrunthese tests for configurations where speculative/delayed allocations don't work?
Perhaps turning off speculative delalloc by adding the mount option "-o allocsize=<1 fsb>" to these tests would result in them always have the same behaviour?
-Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 11 lines · Dave Chinner
Quoted 6 lines · Darrick J. Wong
Quoted 2 lines · Christoph Hellwig
These fail for various non-default configs like DAX, alwayscow and small block sizes.
Shouldn't we selectively
_notrunthese tests for configurations where speculative/delayed allocations don't work?Perhaps turning off speculative delalloc by adding the mount option "-o allocsize=<1 fsb>" to these tests would result in them always have the same behaviour?
But it also kinda defeats what they are trying to test? At least that's my understanding, but your wrote them, though..
Quoted 9 lines · Darrick J. Wong
Quoted 2 lines · Christoph Hellwig
These fail for various non-default configs like DAX, alwayscow and small block sizes.
Shouldn't we selectively
_notrunthese tests for configurations where speculative/delayed allocations don't work?I had started on a helper to try to detect the situations where the tests cannot ever pass, but never quite finished it:
If you get that to fully work it seems like a good idea, yes.
Quoted 39 lines · Darrick J. Wong
Quoted 2 lines · Christoph Hellwig
These fail for various non-default configs like DAX, alwayscow and small block sizes.
Shouldn't we selectively
_notrunthese tests for configurations where speculative/delayed allocations don't work?I had started on a helper to try to detect the situations where the tests cannot ever pass, but never quite finished it:
common/xfs +21
-0@@ -2238,3 +2238,34 @@ _scratch_xfs_scrubbed() { $XFS_SCRUBBED_PROG "${scrubbed_args[@]}" "$@" $SCRATCH_MNT } + +# Will this filesystem create speculative post-EOF preallocations for a file? +_require_speculative_prealloc() +{ + local file="$1" + local tries + local overage + + # Now that we have background garbage collection processes that can be + # triggered by low space/quota conditions, it's possible that we won't + # succeed in creating a speculative preallocation on the first try. + for ((tries = 0; tries < 5; tries++)); do + rm -f $file + + # a few file extending open-write-close cycles should be enough + # to trigger the fs to retain preallocation. write 256k in 32k + # intervals to be sure + for i in $(seq 0 32768 262144); do + $XFS_IO_PROG -f -c "pwrite $i 32k" $file >> $seqres.full + + # Do we have more blocks allocated than what we've
common/xfs _scratch_xfs_scrubbed() { · line 2271
Quoted 10 lines
common/xfs +10
-0+ # written so far? + overage="$(stat -c '%b * %B - %s' $file | bc)" + test "$overage" -gt 0 && return 0 + done + done + + _notrun "Warning: No speculative preallocation for $file after " \ + "$tries iterations." \ + "Check use of the allocsize= mount option." +}
Before we remove these cases from auto group, if above function can help these test cases to be stable passed as expected. I'm glad to consider it at first :)
Thanks,
Zorro
Quoted 68 lines
--D
Quoted 64 lines
Signed-off-by Christoph Hellwig <[email protected]>--- tests/xfs/629 | 2 +- tests/xfs/630 | 2 +- tests/xfs/631 | 2 +- tests/xfs/632 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)tests/xfs/629 +1
-1@@ -8,7 +8,7 @@ # . ./common/preamble -_begin_fstest auto quick prealloc rw +_begin_fstest prealloc rw . ./common/filtertests/xfs/630 +1
-1@@ -8,7 +8,7 @@ # . ./common/preamble -_begin_fstest auto quick prealloc rw +_begin_fstest prealloc rw . ./common/filtertests/xfs/631 +1
-1@@ -8,7 +8,7 @@ # . ./common/preamble -_begin_fstest auto quick prealloc rw +_begin_fstest prealloc rw . ./common/filtertests/xfs/632 +1
-1@@ -9,7 +9,7 @@ # . ./common/preamble -_begin_fstest auto prealloc rw +_begin_fstest prealloc rw . ./common/filterSignature · 1 line
2.45.2
Quoted 9 lines · Darrick J. Wong
Quoted 2 lines · Christoph Hellwig
These fail for various non-default configs like DAX, alwayscow and small block sizes.
Shouldn't we selectively
_notrunthese tests for configurations where speculative/delayed allocations don't work?I had started on a helper to try to detect the situations where the tests cannot ever pass, but never quite finished it:
Did you ever finish this off?