@@ -25,8 +25,7 @@ _supported_fs btrfs
_wants_kernel_commit eb3b50536642 \
"btrfs: scrub: per-device bandwidth control"
-# We want at least 5G for the scratch device.
-_require_scratch_size $(( 5 * 1024 * 1024))
+_require_scratch
_require_dm_target delay
# Make sure we can create scrub progress data file
@@ -49,9 +48,8 @@ if [ ! -f "${devinfo_dir}/scrub_speed_max" ]; then
_notrun "No sysfs interface for scrub speed throttle"
fi
-# Create a 2G file for later scrub workload.
-# The 2G size is chosen to fit even DUP on a 5G disk.
-$XFS_IO_PROG -f -c "pwrite -i /dev/urandom 0 2G" $SCRATCH_MNT/file | _filter_xfs_io
+# Create a 100M file for later scrub workload.
+$XFS_IO_PROG -f -c "pwrite 0 100M" $SCRATCH_MNT/file | _filter_xfs_io
# Writeback above data, as scrub only verify the committed data.
sync
@@ -1,3 +1,3 @@
QA output created by 282
-wrote 2147483648/2147483648 bytes at offset 0
+wrote 104857600/104857600 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
The use of dmdelay means that we can use a smaller dataset while still achieving a reasonable scrub duration. This also drops the xfs_io pwrite /dev/urandom input file, instead relying on xfs_io's built-in pseudorandom pattern generation. Signed-off-by: David Disseldorp <ddiss@suse.de> --- tests/btrfs/282 | 8 +++----- tests/btrfs/282.out | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-)