mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Use truncate instead of fallocate in ziltest.sh
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 <behlendorf1@llnl.gov>
This commit is contained in:
parent
541da9935d
commit
5970eb3d60
@ -116,8 +116,8 @@ test $# -eq 0 || bail "usage: $CMD"
|
|||||||
# Create a destination for runtime copy of FS
|
# Create a destination for runtime copy of FS
|
||||||
# Freeze transaction syncing in the pool
|
# Freeze transaction syncing in the pool
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
fallocate -l "$DEVSIZE" $POOLFILE || bail "can't make $POOLFILE"
|
truncate -s "$DEVSIZE" $POOLFILE || bail "can't make $POOLFILE"
|
||||||
fallocate -l "$DEVSIZE" $SLOGFILE || bail "can't make $SLOGFILE"
|
truncate -s "$DEVSIZE" $SLOGFILE || bail "can't make $SLOGFILE"
|
||||||
zpool create $POOL $POOLFILE log $SLOGFILE || bail "can't create pool
|
zpool create $POOL $POOLFILE log $SLOGFILE || bail "can't create pool
|
||||||
$POOL"
|
$POOL"
|
||||||
zpool list $POOL
|
zpool list $POOL
|
||||||
|
Loading…
Reference in New Issue
Block a user