Unverified Commit 4b8a58bc authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Use fallocate instead of truncate

parent 95017b4d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ DATA="$IMG/data$DISK_SIZE.img"

if [ ! -f "$DATA" ]; then
    # Create an empty file
    truncate -s "${NEW_SIZE}" "${DATA}"
    fallocate -l "${NEW_SIZE}" "${DATA}"
    # Format as BTRFS filesystem
    mkfs.btrfs -q -L data -d single -m dup "${DATA}" > /dev/null
fi