Skip to content

Commit

Permalink
Use truncate instead of fallocate in ziltest.sh
Browse files Browse the repository at this point in the history
For the purposes of creating sparse files the truncate command is
preferable to fallocate because generic sparse files are more widely
supported by older platforms.  Specifically Debian Wheezy which is
based on a 2.6.32 kernel used ext3 by default which at the time did
not support it.

Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
behlendorf committed Jul 13, 2015
1 parent 541da99 commit 5970eb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/ziltest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ test $# -eq 0 || bail "usage: $CMD"
# Create a destination for runtime copy of FS
# Freeze transaction syncing in the pool
# ====================================================================
fallocate -l "$DEVSIZE" $POOLFILE || bail "can't make $POOLFILE"
fallocate -l "$DEVSIZE" $SLOGFILE || bail "can't make $SLOGFILE"
truncate -s "$DEVSIZE" $POOLFILE || bail "can't make $POOLFILE"
truncate -s "$DEVSIZE" $SLOGFILE || bail "can't make $SLOGFILE"
zpool create $POOL $POOLFILE log $SLOGFILE || bail "can't create pool
$POOL"
zpool list $POOL
Expand Down

0 comments on commit 5970eb3

Please sign in to comment.