2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Facebook. All Rights Reserved.
7 # Run the fiemap (file extent mapping) tester with preallocation enabled
10 _begin_fstest auto quick prealloc
12 # Import common functions.
15 # real QA test starts here
19 _require_xfs_io_command "fiemap"
20 _require_xfs_io_command "falloc"
22 _scratch_mkfs > /dev/null 2>&1
23 _scratch_mount > /dev/null 2>&1
25 fiemapfile=$SCRATCH_MNT/$seq.fiemap
27 _require_test_program "fiemap-tester"
29 # FIEMAP test doesn't like finding unwritten blocks after it punches out
30 # a partial rt extent.
31 test "$FSTYP" = "xfs" && \
32 _require_file_block_size_equals_fs_block_size $SCRATCH_MNT
36 echo "using seed $seed" >> $seqres.full
38 echo "fiemap run with sync"
39 $here/src/fiemap-tester -q -S -s $seed -r 200 $fiemapfile 2>&1 | \
42 echo "fiemap run without sync"
43 $here/src/fiemap-tester -q -s $seed -r 200 $fiemapfile 2>&1 | \