2 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright 2021 Red Hat, Inc.
7 # Test a write fault scenario on a shutdown fs.
10 _begin_fstest auto quick shutdown
15 _require_scratch_nocheck
16 _require_scratch_shutdown
18 _scratch_mkfs &>> $seqres.full
21 # XFS had a regression where it failed to check shutdown status in the fault
22 # path. This produced an iomap warning because writeback failure clears Uptodate
24 file=$SCRATCH_MNT/file
25 $XFS_IO_PROG -fc "pwrite 0 4k" -c fsync $file | _filter_xfs_io
27 $XFS_IO_PROG -x -c "mmap 0 4k" -c "mwrite 0 4k" -c shutdown -c fsync \
28 -c "mwrite 0 4k" $file | _filter_xfs_io