Use the newly introduced _fixed_by_fs_commit function where appropriate.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
_require_scratch
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 6599716de2d6 \
+_fixed_by_fs_commit btrfs 6599716de2d6 \
"btrfs: fix -ENOSPC mmap write failure on NOCOW files/extents"
# Use a 512M fs so that it's fast to fill it with data but not too small such
_require_odirect
_require_test_program dio-append-buf-fault
-[ $FSTYP == "btrfs" ] && \
- _fixed_by_kernel_commit 939b656bc8ab \
+_fixed_by_fs_commit btrfs 939b656bc8ab \
"btrfs: fix corruption after buffer fault in during direct IO append write"
# On error the test program writes messages to stderr, causing a golden output
_require_test
-if [ $FSTYP == "btrfs" ]; then
- _fixed_by_kernel_commit da2dccd7451d \
- "btrfs: fix hole expansion when writing at an offset beyond EOF"
- _fixed_by_kernel_commit 8e4f21f2b13d \
- "btrfs: handle unaligned EOF truncation correctly for subpage cases"
-fi
+_fixed_by_fs_commit btrfs da2dccd7451d \
+ "btrfs: fix hole expansion when writing at an offset beyond EOF"
+_fixed_by_fs_commit btrfs 8e4f21f2b13d \
+ "btrfs: handle unaligned EOF truncation correctly for subpage cases"
# on failure, replace -q with -d to see post-eof writes in the dump output
run_fsx "-q -S 0 -e 1 -N 100000"
_require_command "$TIMEOUT_PROG" timeout
# Triggers very frequently with kernel config CONFIG_BTRFS_ASSERT=y.
-[ $FSTYP == "btrfs" ] && \
- _fixed_by_kernel_commit cd9253c23aed \
+_fixed_by_fs_commit btrfs cd9253c23aed \
"btrfs: fix race between direct IO write and fsync when using same fd"
# On error the test program writes messages to stderr, causing a golden output
. ./common/preamble
_begin_fstest auto rmap fsmap
-if [ "$FSTYP" = "xfs" ]; then
- _fixed_by_kernel_commit 68415b349f3f \
- "xfs: Fix the owner setting issue for rmap query in xfs fsmap"
- _fixed_by_kernel_commit ca6448aed4f1 \
- "xfs: Fix missing interval for missing_owner in xfs fsmap"
-elif [ "$FSTYP" = "ext4" ]; then
- _fixed_by_kernel_commit 4a622e4d477b \
- "ext4: fix FS_IOC_GETFSMAP handling"
-fi
+_fixed_by_fs_commit xfs 68415b349f3f \
+ "xfs: Fix the owner setting issue for rmap query in xfs fsmap"
+_fixed_by_fs_commit xfs ca6448aed4f1 \
+ "xfs: Fix missing interval for missing_owner in xfs fsmap"
+_fixed_by_fs_commit ext4 4a622e4d477b \
+ "ext4: fix FS_IOC_GETFSMAP handling"
. ./common/filter
_require_odirect 512 # see fio job1 config below
_require_aio
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit xxxxxxxxxxxx \
+_fixed_by_fs_commit btrfs xxxxxxxxxxxx \
"btrfs: avoid deadlock when reading a partial uptodate folio"
iterations=$((32 * LOAD_FACTOR))
_begin_fstest ioctl quick
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit 2a492ff66673 \
+_fixed_by_fs_commit xfs 2a492ff66673 \
"xfs: Check for delayed allocations before setting extsize"
_require_scratch_extsize
. ./common/reflink
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 03018e5d8508 \
+_fixed_by_fs_commit btrfs 03018e5d8508 \
"btrfs: fix swap file activation failure due to extents that used to be shared"
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit 2d873efd174b \
- "xfs: flush inodegc before swapon"
+_fixed_by_fs_commit xfs 2d873efd174b "xfs: flush inodegc before swapon"
_require_scratch_swapfile
_require_scratch_reflink
_require_test
_require_test_program rewinddir-test
-[ $FSTYP == "btrfs" ] && _fixed_by_kernel_commit e60aa5da14d0 \
+_fixed_by_fs_commit btrfs e60aa5da14d0 \
"btrfs: refresh dir last index during a rewinddir(3) call"
target_dir="$TEST_DIR/test-$seq"
. ./common/filter
. ./common/reflink
-test "$FSTYP" = "xfs" && \
- _fixed_by_kernel_commit 7ce31f20a077 "xfs: don't drop errno values when we fail to ficlone the entire range"
+_fixed_by_fs_commit xfs 7ce31f20a077 "xfs: don't drop errno values when we fail to ficlone the entire range"
_require_scratch_reflink
_require_test_program "punch-alternating"
. ./common/filter
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit e4826691cc7e \
+_fixed_by_fs_commit xfs e4826691cc7e \
"xfs: restore shutdown check in mapped write fault path"
_require_scratch_nocheck
_exclude_fs overlay
_require_extra_fs overlay
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit 6da1b4b1ab36 \
- "xfs: fix an ABBA deadlock in xfs_rename"
+_fixed_by_fs_commit xfs 6da1b4b1ab36 "xfs: fix an ABBA deadlock in xfs_rename"
_scratch_mkfs >> $seqres.full
_scratch_mount
. ./common/preamble
_begin_fstest auto quick recoveryloop shutdown
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit 50d25484bebe \
+_fixed_by_fs_commit xfs 50d25484bebe \
"xfs: sync lazy sb accounting on quiesce of read-only mounts"
_require_scratch
# Modify as appropriate.
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit 72a048c1056a \
+_fixed_by_fs_commit xfs 72a048c1056a \
"xfs: only set IOMAP_F_SHARED when providing a srcmap to a write"
_require_cp_reflink
. ./common/preamble
_begin_fstest auto rw stress soak
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit ecd49f7a36fb \
+_fixed_by_fs_commit xfs ecd49f7a36fb \
"xfs: fix per-cpu CIL structure aggregation racing with dying cpus"
# Override the default cleanup function.
. ./common/dmflakey
. ./common/punch
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit e6e3dec6c3c288 \
+_fixed_by_fs_commit btrfs e6e3dec6c3c288 \
"btrfs: update generation of hole file extent item when merging holes"
_require_scratch
_require_dm_target flakey
_require_attrs
_require_renameat2 whiteout
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit 70b589a37e1a \
+_fixed_by_fs_commit xfs 70b589a37e1a \
"xfs: add selinux labels to whiteout inodes"
get_selinux_label()
rm -r -f $tmp.* $junk_dir
}
-[ "$FSTYP" = "exfat" ] && _fixed_by_kernel_commit 92fba084b79e \
+_fixed_by_fs_commit exfat 92fba084b79e \
"exfat: fix i_blocks for files truncated over 4 GiB"
_require_test
. ./common/filter
. ./common/reflink
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit ac3c0d36a2a2f7 \
+_fixed_by_fs_commit btrfs ac3c0d36a2a2f7 \
"btrfs: make fiemap more efficient and accurate reporting extent sharedness"
_require_scratch_reflink
fio_out=$tmp.fio.out
test_file="${SCRATCH_MNT}/foo"
-[ $FSTYP == "btrfs" ] &&
- _fixed_by_kernel_commit 8184620ae212 \
+_fixed_by_fs_commit btrfs 8184620ae212 \
"btrfs: fix lost file sync on direct IO write with nowait and dsync iocb"
# We allocate 256M of data for the test file, so require a higher size of 512M
# Import common functions.
. ./common/scsi_debug
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit 7c71ee78031c \
+_fixed_by_fs_commit xfs 7c71ee78031c \
"xfs: allow logical-sector sized O_DIRECT"
_require_scsi_debug
. ./common/preamble
_begin_fstest auto quick seek
-[ $FSTYP == "btrfs" ] &&
- _fixed_by_kernel_commit 2f2e84ca6066 \
+_fixed_by_fs_commit btrfs 2f2e84ca6066 \
"btrfs: fix off-by-one in delalloc search during lseek"
_require_test
_require_scratch
-[ "$FSTYP" = "udf" ] && _fixed_by_kernel_commit f950fd052913 \
+_fixed_by_fs_commit udf f950fd052913 \
"udf: Protect rename against modification of moved directory"
[[ "$FSTYP" =~ ext[0-9]+ ]] && _fixed_by_kernel_commit 0813299c586b \
"ext4: Fix possible corruption when moving a directory"
. ./common/preamble
_begin_fstest quick auto mmap
-[ $FSTYP == "btrfs" ] && \
- _fixed_by_kernel_commit b73a6fd1b1ef \
+_fixed_by_fs_commit btrfs b73a6fd1b1ef \
"btrfs: split partial dio bios before submit"
_require_test
_require_test_program "t_reflink_read_race"
_require_command "$TIMEOUT_PROG" timeout
-case "$FSTYP" in
-"btrfs")
- _fixed_by_kernel_commit 5d6f0e9890ed \
+_fixed_by_fs_commit btrfs 5d6f0e9890ed \
"btrfs: stop locking the source extent range during reflink"
- ;;
-"xfs")
- _fixed_by_kernel_commit 14a537983b22 \
+_fixed_by_fs_commit xfs 14a537983b22 \
"xfs: allow read IO and FICLONE to run concurrently"
- ;;
-esac
rm -f "$seqres.full"
_require_test
_require_test_program readdir-while-renames
-[ $FSTYP = "btrfs" ] && _fixed_by_kernel_commit 9b378f6ad48c \
+_fixed_by_fs_commit btrfs 9b378f6ad48c \
"btrfs: fix infinite directory reads"
target_dir="$TEST_DIR/test-$seq"
. ./common/preamble
_begin_fstest auto quick freeze
-[ "$FSTYP" = "xfs" ] && _fixed_by_kernel_commit ab23a7768739 \
+_fixed_by_fs_commit xfs ab23a7768739 \
"xfs: per-cpu deferred inode inactivation queues"
_cleanup()
_require_scratch
_require_dm_target flakey
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 2f1aeab9fca1 \
+_fixed_by_fs_commit btrfs 2f1aeab9fca1 \
"btrfs: return accurate error code on open failure"
_scratch_mkfs >> $seqres.full
. ./common/preamble
_begin_fstest quick auto fiemap mmap
-[ $FSTYP == "btrfs" ] && \
- _fixed_by_kernel_commit b0ad381fa769 \
+_fixed_by_fs_commit btrfs b0ad381fa769 \
"btrfs: fix deadlock with fiemap and extent locking"
_cleanup()
_require_attrs
_require_odirect
_require_xfs_io_command falloc -k
-[ "$FSTYP" = btrfs ] && _fixed_by_kernel_commit 9d274c19a71b \
+_fixed_by_fs_commit btrfs 9d274c19a71b \
"btrfs: fix crash on racing fsync and size-extending write into prealloc"
# -i slows down xfs_io startup and makes the race much less reliable.
_require_hardlinks
_require_test
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 3bc2ac2f8f0b \
+_fixed_by_fs_commit btrfs 3bc2ac2f8f0b \
"btrfs: update target inode's ctime on unlink"
testfile="$TEST_DIR/unlink-ctime1.$$"
}
-[ $FSTYP = "btrfs" ] && _fixed_by_kernel_commit e917ff56c8e7 \
+_fixed_by_fs_commit btrfs e917ff56c8e7 \
"btrfs: determine synchronous writers from bio or writeback control"
fio_config=$tmp.fio
_require_odirect
_require_test_program dio-writeback-race
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 968f19c5b1b7 \
+_fixed_by_fs_commit btrfs 968f19c5b1b7 \
"btrfs: always fallback to buffered write if the inode requires checksum"
_scratch_mkfs > $seqres.full 2>&1
# Import common functions.
. ./common/filter
-[ "$FSTYP" = "exfat" ] && _fixed_by_kernel_commit dda0407a2026 \
+_fixed_by_fs_commit exfat dda0407a2026 \
"exfat: short-circuit zero-byte writes in exfat_file_write_iter"
# Modify as appropriate.
. ./common/dmflakey
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 5e85262e542d \
+_fixed_by_fs_commit btrfs 5e85262e542d \
"btrfs: fix fsync of files with no hard links not persisting deletion"
_require_scratch
_exclude_fs ext2
-[ $FSTYP == "ext4" ] && \
- _fixed_by_kernel_commit 273108fa5015 \
- "ext4: handle read only external journal device"
+_fixed_by_fs_commit ext4 273108fa5015 \
+ "ext4: handle read only external journal device"
-[ $FSTYP == "xfs" ] && \
- _fixed_by_kernel_commit bfecc4091e07 \
+_fixed_by_fs_commit xfs bfecc4091e07 \
"xfs: allow ro mounts if rtdev or logdev are read-only"
_require_scratch_nocheck
_require_test_program unlink-fsync
_require_dm_target flakey
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 0a32e4f0025a \
+_fixed_by_fs_commit btrfs 0a32e4f0025a \
"btrfs: fix log tree replay failure due to file with 0 links and extents"
_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
_require_symlinks
_require_dm_target flakey
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 953902e4fb4c \
+_fixed_by_fs_commit btrfs 953902e4fb4c \
"btrfs: set inode flag BTRFS_INODE_COPY_EVERYTHING when logging new name"
rm -f $seqres.full
_require_scratch
_require_dm_target flakey
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit bfe3d755ef7c \
+_fixed_by_fs_commit btrfs bfe3d755ef7c \
"btrfs: do not update last_log_commit when logging inode due to a new name"
_scratch_mkfs >>$seqres.full 2>&1 || _fail "mkfs failed"
_require_scratch
_require_dm_target flakey
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 266273eaf4d9 \
+_fixed_by_fs_commit btrfs 266273eaf4d9 \
"btrfs: don't log conflicting inode if it's a dir moved in the current transaction"
_scratch_mkfs >>$seqres.full 2>&1 || _fail "mkfs failed"
_require_dm_target flakey
_require_fssum
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit 5630f7557de6 \
+_fixed_by_fs_commit btrfs 5630f7557de6 \
"btrfs: do not skip logging new dentries when logging a new name"
_scratch_mkfs >>$seqres.full 2>&1 || _fail "mkfs failed"
_require_scratch
_require_dm_target flakey
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit xxxxxxxxxxxx \
+_fixed_by_fs_commit btrfs xxxxxxxxxxxx \
"btrfs: fix zero size inode with non-zero size after log replay"
_scratch_mkfs >>$seqres.full 2>&1 || _fail "mkfs failed"
_require_scratch
_require_dm_target flakey
-[ "$FSTYP" = "btrfs" ] && _fixed_by_kernel_commit xxxxxxxxxxxx \
+_fixed_by_fs_commit btrfs xxxxxxxxxxxx \
"btrfs: log new dentries when logging parent dir of a conflicting inode"
_scratch_mkfs >>$seqres.full 2>&1 || _fail "mkfs failed"