2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2018 Oracle. All Rights Reserved.
7 # Reproduce a regression of btrfs that leads to -EEXIST on creating new files
11 # Btrfs: fix unexpected -EEXIST when creating new inode
14 seqres=$RESULT_DIR/$seq
15 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
27 # get standard environment, filters and checks
32 # real QA test starts here
36 _require_dm_target flakey
40 _scratch_mkfs >>$seqres.full 2>&1
41 _require_metadata_journaling $SCRATCH_DEV
45 # create a file and keep it in write ahead log
46 $XFS_IO_PROG -f -c "fsync" $SCRATCH_MNT/foo
48 # fail this filesystem so that remount can replay the write ahead log
49 _flakey_drop_and_remount
51 # see if we can create a new file successfully
52 touch $SCRATCH_MNT/bar
56 echo "Silence is golden"