2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 Fujitsu. All Rights Reserved.
7 # This is a regression test for kernel patch:
8 # commit aa2f77920b74 ("ext4: disallow modifying DAX inode flag if inline_data has been set")
11 _begin_fstest auto quick dax
13 # Import common functions.
16 # real QA test starts here
18 _require_scratch_dax_mountopt "dax=always"
20 _require_scratch_ext4_feature "inline_data"
22 TESTFILE=$SCRATCH_MNT/testfile
24 _scratch_mkfs_ext4 -O inline_data > $seqres.full 2>&1
26 _scratch_mount "-o dax=inode" >> $seqres.full 2>&1
28 echo "Need to make some inline data..." > $TESTFILE
30 # It's fine to disallow modifying DAX inode flag on the file which
31 # has inline_data flag.
32 if $XFS_IO_PROG -c "chattr +x" $TESTFILE >> $seqres.full 2>&1; then
33 _scratch_cycle_mount "dax=inode"
34 echo 'Append data' >> $TESTFILE
38 echo "Silence is golden"