From 3308bf8d8ca562fc694900b39a40a942b1c1adfe Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 24 Feb 2020 12:27:22 -0800 Subject: [PATCH] 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 --- tests/tests/simple-release-extents.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/tests/simple-release-extents.sh b/tests/tests/simple-release-extents.sh index 90e06380..4fa9583b 100644 --- a/tests/tests/simple-release-extents.sh +++ b/tests/tests/simple-release-extents.sh @@ -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