2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Oracle, Inc. All Rights Reserved.
7 # Populate a XFS filesystem and fuzz every block-format dir block field.
8 # Use xfs_scrub to fix the corruption.
11 _begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
13 _register_cleanup "_cleanup" BUS
15 # Import common functions.
20 # real QA test starts here
22 _require_scratch_xfs_fuzz_fields
24 echo "Format and populate"
25 _scratch_populate_cached nofill > $seqres.full 2>&1
27 echo "Find data-format dir block"
29 inum=$(stat -c '%i' $SCRATCH_MNT/S_IFDIR.FMT_BLOCK)
32 echo "Fuzz data-format dir block"
33 _scratch_xfs_fuzz_metadata '' 'online' "inode ${inum}" 'dblock 0' >> $seqres.full
34 echo "Done fuzzing data-format dir block"