mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-31 12:33:19 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user