touch $DIR/$tfile
stack_trap "rm -f $DIR/$tfile; wait_delete_completed"
- check_fallocate $DIR/$tfile || error "fallocate failed"
+ check_fallocate $DIR/$tfile || skip_eopnotsupp "fallocate failed"
}
run_test 150b "Verify fallocate (prealloc) functionality"
stack_trap "rm -f $DIR/$tfile; wait_delete_completed"
dd if=/dev/urandom of=$DIR/$tfile bs=1M count=20 || error "dd failed"
> $DIR/$tfile
- fallocate -l $((1048576 * 20)) $DIR/$tfile || error "fallocate failed"
+ fallocate -l $((1048576 * 20)) $DIR/$tfile ||
+ skip_eopnotsupp "fallocate failed"
# precomputed md5sum for 20MB of zeroes
local expect="8f4e33f3dc3e414ff94e5fb6905cba8c"
local sum=($(md5sum $DIR/$tfile))
check_set_fallocate 1
> $DIR/$tfile
- fallocate -l $((1048576 * 20)) $DIR/$tfile || error "fallocate failed"
+ fallocate -l $((1048576 * 20)) $DIR/$tfile ||
+ skip_eopnotsupp "fallocate failed"
sum=($(md5sum $DIR/$tfile))
[[ "${sum[0]}" == "$expect" ]] || error "fallocate zero is not zero"
stack_trap "rm -f $DIR/$tfile; wait_delete_completed"
$LFS setstripe -c $OSTCOUNT -S1M $DIR/$tfile || error "setstripe failed"
- fallocate -l ${OSTCOUNT}m $DIR/$tfile || error "fallocate failed"
+ fallocate -l ${OSTCOUNT}m $DIR/$tfile ||
+ skip_eopnotsupp "fallocate failed"
local bytes=$(($(stat -c '%b * %B' $DIR/$tfile)))
local want=$((OSTCOUNT * 1048576))
$LFS setstripe -E1M $striping -E16M -c3 -Eeof -c 4 $DIR/$tfile ||
error "Create $DIR/$tfile failed"
fallocate -l $((1048576 * 512)) $DIR/$tfile ||
- error "fallocate failed"
+ skip_eopnotsupp "fallocate failed"
bytes=$(($(stat -c '%b * %B' $DIR/$tfile)))
want=$((512 * 1048576))
stack_trap "rm -f $DIR/$tfile; wait_delete_completed"
$LFS setstripe -E1M $striping -E eof -c $OSTCOUNT -S1M $DIR/$tdir ||
error "setstripe failed"
- fallocate -o 1G -l ${OSTCOUNT}m $DIR/$tdir || error "fallocate failed"
+ fallocate -o 1G -l ${OSTCOUNT}m $DIR/$tdir ||
+ skip_eopnotsupp "fallocate failed"
local bytes=$(($(stat -c '%b * %B' $DIR/$tdir)))
local want=$((OSTCOUNT * 1048576))
fi
fallocate -l${space}k $DIR/$tfile ||
- error "fallocate ${space}k $DIR/$tfile failed"
+ skip_eopnotsupp "fallocate ${space}k $DIR/$tfile failed"
echo "'fallocate -l ${space}k $DIR/$tfile' succeeded"
# get size immediately after fallocate. This should be correctly
# Call fallocate with punch range which is within the file range
fallocate -p --offset 4096 -l $length $DIR/$tfile ||
- error "fallocate failed: offset 4096 and length $length"
+ skip_eopnotsupp "fallocate failed: offset 4096 and length $length"
# client must see changes immediately after fallocate
size=$(stat -c '%s' $DIR/$tfile)
blocks=$(stat -c '%b' $DIR/$tfile)
# Punch overlaps two blocks and less than blocksize
fallocate -p --offset 4000 -l 3000 $DIR/$tfile ||
- error "fallocate failed: offset 4000 length 3000"
+ skip_eopnotsupp "fallocate failed: offset 4000 length 3000"
size=$(stat -c '%s' $DIR/$tfile)
blocks=$(stat -c '%b' $DIR/$tfile)
echo "Verify fallocate punch: Very large Range"
fallocate -l${space}k $DIR/$tfile ||
- error "fallocate ${space}k $DIR/$tfile failed"
+ skip_eopnotsupp "fallocate ${space}k $DIR/$tfile failed"
# write 1M at the end, start and in the middle
yes 'A' | dd of=$DIR/$tfile bs=$BS count=256 ||
error "dd failed: bs $BS count 256"
# first and the last block
echo "fallocate -p --offset $BS -l $punch_size $DIR/$tfile"
fallocate -p --offset $BS -l $punch_size $DIR/$tfile ||
- error "fallocate failed: offset $BS length $punch_size"
+ skip_eopnotsupp "fallocate failed: offset $BS length $punch_size"
size_after=$(stat -c '%s' $DIR/$tfile)
blocks_after=$(stat -c '%b' $DIR/$tfile)