scoutfs-tests: use fallocate to get large extent

The simple-release-extents test wanted to create a file with a single
large extent, but it did it with a streaming write.  While we'd like
our data allocator to create a large extent from initial writes, it
certainly doesn't guarantee it.  Fallocate is much more likely to
createa a large extent.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2020-02-25 12:04:44 -08:00
committed by Zach Brown
parent cce20dbeb6
commit 3308bf8d8c
+4 -1
View File
@@ -13,7 +13,10 @@ create_file() {
local file="$1"
local size="$2"
t_quiet xfs_io -f -c "pwrite 0 $size" "$file"
t_quiet xfs_io -f \
-c "falloc 0 $size" \
-c "pwrite 0 $size" \
"$file"
}
# if vers is "stat" then we ask stat_more for the data_version