fstests: add a btrfs fiemap test and fiemap test group
cover fstests: add a btrfs fiemap test and fiemap test group
From: Filipe Manana <[email protected]>
Add a new btrfs test case to exercise fiemap in the presence of a snapshot, and then add a fiemap test group, as well as some missing '_require_xfs_io_command "fiemap"' calls in a few tests.
Filipe Manana (3):
btrfs: test fiemap on large file with extents shared through a snapshot
fstests: add missing require of xfs_io fiemap command to some tests
fstests: add fiemap group
doc/group-names.txt | 1 + tests/btrfs/004 | 2 +- tests/btrfs/079 | 2 +- tests/btrfs/137 | 2 +- tests/btrfs/140 | 2 +- tests/btrfs/199 | 2 +- tests/btrfs/200 | 2 +- tests/btrfs/211 | 2 +- tests/btrfs/257 | 3 +- tests/btrfs/258 | 3 +- tests/btrfs/259 | 3 +- tests/btrfs/260 | 2 +- tests/btrfs/263 | 2 +- tests/btrfs/276 | 124 ++++++++++++++++++++++++++++++++++++++++++++ tests/btrfs/276.out | 16 ++++++ tests/ext4/001 | 2 +- tests/ext4/034 | 2 +- tests/ext4/308 | 2 +- tests/f2fs/002 | 2 +- tests/generic/009 | 2 +- tests/generic/012 | 2 +- tests/generic/016 | 2 +- tests/generic/017 | 2 +- tests/generic/021 | 2 +- tests/generic/022 | 2 +- tests/generic/032 | 2 +- tests/generic/043 | 2 +- tests/generic/044 | 2 +- tests/generic/045 | 2 +- tests/generic/046 | 2 +- tests/generic/047 | 2 +- tests/generic/048 | 2 +- tests/generic/049 | 2 +- tests/generic/058 | 2 +- tests/generic/060 | 2 +- tests/generic/061 | 2 +- tests/generic/063 | 2 +- tests/generic/064 | 2 +- tests/generic/092 | 2 +- tests/generic/094 | 2 +- tests/generic/110 | 2 +- tests/generic/111 | 2 +- tests/generic/115 | 2 +- tests/generic/177 | 2 +- tests/generic/225 | 2 +- tests/generic/255 | 2 +- tests/generic/301 | 2 +- tests/generic/302 | 2 +- tests/generic/305 | 2 +- tests/generic/316 | 2 +- tests/generic/326 | 2 +- tests/generic/327 | 2 +- tests/generic/328 | 2 +- tests/generic/352 | 2 +- tests/generic/353 | 2 +- tests/generic/372 | 2 +- tests/generic/414 | 2 +- tests/generic/425 | 2 +- tests/generic/473 | 2 +- tests/generic/483 | 2 +- tests/generic/516 | 2 +- tests/generic/519 | 2 +- tests/generic/540 | 2 +- tests/generic/541 | 2 +- tests/generic/542 | 2 +- tests/generic/543 | 2 +- tests/generic/578 | 2 +- tests/generic/654 | 2 +- tests/generic/655 | 2 +- tests/generic/677 | 2 +- tests/generic/679 | 2 +- tests/generic/695 | 2 +- tests/overlay/066 | 2 +- tests/shared/298 | 2 +- tests/xfs/180 | 2 +- tests/xfs/182 | 2 +- tests/xfs/184 | 2 +- tests/xfs/192 | 2 +- tests/xfs/193 | 2 +- tests/xfs/198 | 2 +- tests/xfs/200 | 2 +- tests/xfs/204 | 2 +- tests/xfs/207 | 2 +- tests/xfs/208 | 2 +- tests/xfs/209 | 2 +- tests/xfs/210 | 2 +- tests/xfs/211 | 2 +- tests/xfs/212 | 2 +- tests/xfs/213 | 2 +- tests/xfs/214 | 2 +- tests/xfs/231 | 2 +- tests/xfs/232 | 2 +- tests/xfs/252 | 2 +- tests/xfs/344 | 2 +- tests/xfs/345 | 2 +- tests/xfs/346 | 2 +- tests/xfs/347 | 2 +- tests/xfs/443 | 3 +- 98 files changed, 240 insertions(+), 95 deletions(-) create mode 100755 tests/btrfs/276 create mode 100644 tests/btrfs/276.out
Signature · 1 line
2.35.1
PATCH 1/3 btrfs: test fiemap on large file with extents shared through a snapshot
From: Filipe Manana <[email protected]>
Verify that fiemap correctly reports the sharedness of extents for a file with a very large number of extents, spanning many b+tree leaves in the fs tree, and when the file's subvolume was snapshoted.
Currently this passes on all kernel releases and its purpose is to prevent and detect regressions in the future, as this actually happened during recent development on the btrfs' fiemap related code. With this test we now have better coverage for fiemap when a file is shared through a snapshot.
--- tests/btrfs/276 | 124 ++++++++++++++++++++++++++++++++++++++++++++ tests/btrfs/276.out | 16 ++++++ 2 files changed, 140 insertions(+) create mode 100755 tests/btrfs/276 create mode 100644 tests/btrfs/276.out
tests/btrfs/276 new file +124 -0
@@ -0,0 +1,124 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2022 SUSE Linux Products GmbH. All Rights Reserved. +# +# FS QA Test 276 +# +# Verify that fiemap correctly reports the sharedness of extents for a file with +# a very large number of extents, spanning many b+tree leaves in the fs tree, +# and when the file's subvolume was snapshoted. +# +. ./common/preamble +_begin_fstest auto snapshot compress + +. ./common/filter + +_supported_fs btrfs +_require_scratch +_require_xfs_io_command "fiemap" "ranged" + +_scratch_mkfs >> $seqres.full 2>&1 +# We use compression because it's a very quick way to create a file with a very +# large number of extents (compression limits the maximum extent size to 128K) +# and while using very little disk space. +_scratch_mount -o compress + +fiemap_test_file() +{ + local offset=$1 + local len=$2 + + # Skip the first two lines of xfs_io's fiemap output (file path and + # header describing the output columns). + $XFS_IO_PROG -c "fiemap -v $offset $len" $SCRATCH_MNT/foo | tail -n +3 +} + +# Count the number of shared extents for the whole test file or just for a given +# range. +count_shared_extents() +{ + local offset=$1 + local len=$2 + + # Column 5 (from xfs_io's "fiemap -v" command) is the flags (hex field). + # 0x2000 is the value for the FIEMAP_EXTENT_SHARED flag. + fiemap_test_file $offset $len | \ + $AWK_PROG --source 'BEGIN { cnt = 0 }' \ + --source '{ if (and(strtonum($5), 0x2000)) cnt++ }' \ + --source 'END { print cnt }' +} + +# Count the number of non shared extents for the whole test file or just for a +# given range. +count_not_shared_extents() +{ + local offset=$1 + local len=$2 + + # Column 5 (from xfs_io's "fiemap -v" command) is the flags (hex field). + # 0x2000 is the value for the FIEMAP_EXTENT_SHARED flag. + fiemap_test_file $offset $len | \ + $AWK_PROG --source 'BEGIN { cnt = 0 }' \ + --source '{ if (!and(strtonum($5), 0x2000)) cnt++ }' \ + --source 'END { print cnt }' +} + +# Create a 16G file as that results in 131072 extents, all with a size of 128K +# (due to compression), and a fs tree with a height of 3 (root node at level 2). +# We want to verify later that fiemap correctly reports the sharedness of each +# extent, even when it needs to switch from one leaf to the next one and from a +# node at level 1 to the next node at level 1. +# +$XFS_IO_PROG -f -c "pwrite -b 8M 0 16G" $SCRATCH_MNT/foo | _filter_xfs_io + +# Sync to flush delalloc and commit the current transaction, so fiemap will see +# all extents in the fs tree and extent trees and not look at delalloc. +sync + +# All extents should be reported as non shared (131072 extents). +echo "Number of non-shared extents in the whole file: $(count_not_shared_extents)" + +# Creating a snapshot. +$BTRFS_UTIL_PROG subvolume snapshot $SCRATCH_MNT $SCRATCH_MNT/snap | _filter_scratch + +# We have a snapshot, so now all extents should be reported as shared. +echo "Number of shared extents in the whole file: $(count_shared_extents)" + +# Now COW two file ranges, of 1M each, in the snapshot's file. +# So 16 extents should become non-shared after this. +# +$XFS_IO_PROG -c "pwrite -b 1M 8M 1M" \ + -c "pwrite -b 1M 12G 1M" \ + $SCRATCH_MNT/snap/foo | _filter_xfs_io + +# Sync to flush delalloc and commit the current transaction, so fiemap will see +# all extents in the fs tree and extent trees and not look at delalloc. +sync + +# Now we should have 16 non-shared extents and 131056 (131072 - 16) shared +# extents. +echo "Number of non-shared extents in the whole file: $(count_not_shared_extents)" +echo "Number of shared extents in the whole file: $(count_shared_extents)" + +# Check that the non-shared extents are indeed in the expected file ranges (each +# with 8 extents). +echo "Number of non-shared extents in range [8M, 9M): $(count_not_shared_extents 8M 1M)" +echo "Number of non-shared extents in range [12G, 12G + 1M): $(count_not_shared_extents 12G 1M)" + +# Now delete the snapshot. +$BTRFS_UTIL_PROG subvolume delete -c $SCRATCH_MNT/snap | _filter_scratch + +# We deleted the snapshot and committed the transaction used to delete it (-c), +# but all its extents (both metadata and data) are actually only deleted in the +# background, by the cleaner kthread. So remount, which wakes up the cleaner +# kthread, with a commit interval of 1 second and sleep for 1.1 seconds - after +# this we are guaranteed all extents of the snapshot were deleted. +_scratch_remount commit=1 +sleep 1.1 + +# Now all extents should be reported as not shared (131072 extents). +echo "Number of non-shared extents in the whole file: $(count_not_shared_extents)" + +# success, all done +status=0 +exit
tests/btrfs/276.out new file +16 -0
@@ -0,0 +1,16 @@ +QA output created by 276 +wrote 17179869184/17179869184 bytes at offset 0 +XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Number of non-shared extents in the whole file: 131072 +Create a snapshot of 'SCRATCH_MNT' in 'SCRATCH_MNT/snap' +Number of shared extents in the whole file: 131072 +wrote 1048576/1048576 bytes at offset 8388608 +XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 1048576/1048576 bytes at offset 12884901888 +XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Number of non-shared extents in the whole file: 16 +Number of shared extents in the whole file: 131056 +Number of non-shared extents in range [8M, 9M): 8 +Number of non-shared extents in range [12G, 12G + 1M): 8 +Delete subvolume (commit): 'SCRATCH_MNT/snap' +Number of non-shared extents in the whole file: 131072
Signature · 1 line
2.35.1
PATCH 2/3 fstests: add missing require of xfs_io fiemap command to some tests
In reply to [email protected]From: Filipe Manana <[email protected]>
btrfs/257, btrfs/258, btrfs/259 and xfs/443 use the fiemap command of xfs_io but don't do a '_require_xfs_io_command "fiemap"'. So add the missing requirement.
--- tests/btrfs/257 | 1 + tests/btrfs/258 | 1 + tests/btrfs/259 | 1 + tests/xfs/443 | 1 + 4 files changed, 4 insertions(+)
tests/btrfs/257 +1 -0
@@ -33,6 +33,7 @@ _require_btrfs_no_compress # Needs 4K sectorsize _require_btrfs_support_sectorsize 4096 _require_xfs_io_command "falloc" +_require_xfs_io_command "fiemap" _scratch_mkfs -s 4k >> $seqres.full 2>&1
tests/btrfs/258 +1 -0
@@ -17,6 +17,7 @@ _begin_fstest auto defrag quick # Modify as appropriate. _supported_fs generic _require_scratch +_require_xfs_io_command "fiemap" # Needs 4K sectorsize, as larger sectorsize can change the file layout. _require_btrfs_support_sectorsize 4096
tests/btrfs/259 +1 -0
@@ -18,6 +18,7 @@ _begin_fstest auto quick defrag # Modify as appropriate. _supported_fs btrfs _require_scratch +_require_xfs_io_command "fiemap" _scratch_mkfs >> $seqres.full
tests/xfs/443 +1 -0
@@ -30,6 +30,7 @@ _require_test_program "punch-alternating" _require_xfs_io_command "falloc" _require_xfs_io_command "fpunch" _require_xfs_io_command "swapext" +_require_xfs_io_command "fiemap" _scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs _scratch_mount
Signature · 1 line
2.35.1
PATCH 3/3 fstests: add fiemap group
In reply to [email protected]From: Filipe Manana <[email protected]>
Add a fiemap group for all tests that exercise fiemap, either directly through xfs_io, or more indirectly like through filefrag or helpers in common/* (like _count_extents, _count_holes, etc). This is useful in order to quickly test changes made to the fiemap implementation of a filesystem for example.
--- doc/group-names.txt | 1 + tests/btrfs/004 | 2 +- tests/btrfs/079 | 2 +- tests/btrfs/137 | 2 +- tests/btrfs/140 | 2 +- tests/btrfs/199 | 2 +- tests/btrfs/200 | 2 +- tests/btrfs/211 | 2 +- tests/btrfs/257 | 2 +- tests/btrfs/258 | 2 +- tests/btrfs/259 | 2 +- tests/btrfs/260 | 2 +- tests/btrfs/263 | 2 +- tests/btrfs/276 | 2 +- tests/ext4/001 | 2 +- tests/ext4/034 | 2 +- tests/ext4/308 | 2 +- tests/f2fs/002 | 2 +- tests/generic/009 | 2 +- tests/generic/012 | 2 +- tests/generic/016 | 2 +- tests/generic/017 | 2 +- tests/generic/021 | 2 +- tests/generic/022 | 2 +- tests/generic/032 | 2 +- tests/generic/043 | 2 +- tests/generic/044 | 2 +- tests/generic/045 | 2 +- tests/generic/046 | 2 +- tests/generic/047 | 2 +- tests/generic/048 | 2 +- tests/generic/049 | 2 +- tests/generic/058 | 2 +- tests/generic/060 | 2 +- tests/generic/061 | 2 +- tests/generic/063 | 2 +- tests/generic/064 | 2 +- tests/generic/092 | 2 +- tests/generic/094 | 2 +- tests/generic/110 | 2 +- tests/generic/111 | 2 +- tests/generic/115 | 2 +- tests/generic/177 | 2 +- tests/generic/225 | 2 +- tests/generic/255 | 2 +- tests/generic/301 | 2 +- tests/generic/302 | 2 +- tests/generic/305 | 2 +- tests/generic/316 | 2 +- tests/generic/326 | 2 +- tests/generic/327 | 2 +- tests/generic/328 | 2 +- tests/generic/352 | 2 +- tests/generic/353 | 2 +- tests/generic/372 | 2 +- tests/generic/414 | 2 +- tests/generic/425 | 2 +- tests/generic/473 | 2 +- tests/generic/483 | 2 +- tests/generic/516 | 2 +- tests/generic/519 | 2 +- tests/generic/540 | 2 +- tests/generic/541 | 2 +- tests/generic/542 | 2 +- tests/generic/543 | 2 +- tests/generic/578 | 2 +- tests/generic/654 | 2 +- tests/generic/655 | 2 +- tests/generic/677 | 2 +- tests/generic/679 | 2 +- tests/generic/695 | 2 +- tests/overlay/066 | 2 +- tests/shared/298 | 2 +- tests/xfs/180 | 2 +- tests/xfs/182 | 2 +- tests/xfs/184 | 2 +- tests/xfs/192 | 2 +- tests/xfs/193 | 2 +- tests/xfs/198 | 2 +- tests/xfs/200 | 2 +- tests/xfs/204 | 2 +- tests/xfs/207 | 2 +- tests/xfs/208 | 2 +- tests/xfs/209 | 2 +- tests/xfs/210 | 2 +- tests/xfs/211 | 2 +- tests/xfs/212 | 2 +- tests/xfs/213 | 2 +- tests/xfs/214 | 2 +- tests/xfs/231 | 2 +- tests/xfs/232 | 2 +- tests/xfs/252 | 2 +- tests/xfs/344 | 2 +- tests/xfs/345 | 2 +- tests/xfs/346 | 2 +- tests/xfs/347 | 2 +- tests/xfs/443 | 2 +- 97 files changed, 97 insertions(+), 96 deletions(-)
doc/group-names.txt +1 -0
@@ -47,6 +47,7 @@ eio IO error reporting encrypt encrypted file contents enospc ENOSPC error reporting exportfs file handles +fiemap fiemap ioctl filestreams XFS filestreams allocator freeze filesystem freeze tests fsck general fsck tests
tests/btrfs/004 +1 -1
@@ -10,7 +10,7 @@ # We check to end up back at the original file with the correct offset. # . ./common/preamble -_begin_fstest auto rw metadata +_begin_fstest auto rw metadata fiemap noise_pid=0
tests/btrfs/079 +1 -1
@@ -18,7 +18,7 @@ # btrfs: Fix the wrong condition judgment about subset extent map # . ./common/preamble -_begin_fstest auto rw metadata +_begin_fstest auto rw metadata fiemap # Override the default cleanup function. _cleanup()
tests/btrfs/137 +1 -1
@@ -7,7 +7,7 @@ # Test that both incremental and full send operations preserve file holes. # . ./common/preamble -_begin_fstest auto quick send +_begin_fstest auto quick send fiemap # Override the default cleanup function. _cleanup()
tests/btrfs/140 +1 -1
@@ -12,7 +12,7 @@ # commit 2e949b0a5592 ("Btrfs: fix invalid dereference in btrfs_retry_endio") # . ./common/preamble -_begin_fstest auto quick read_repair +_begin_fstest auto quick read_repair fiemap # Import common functions. . ./common/filter
tests/btrfs/199 +1 -1
@@ -16,7 +16,7 @@ # boundary" # . ./common/preamble -_begin_fstest auto quick trim +_begin_fstest auto quick trim fiemap # Override the default cleanup function. _cleanup()
tests/btrfs/200 +1 -1
@@ -8,7 +8,7 @@ # operations for extents that are shared between the same file. # . ./common/preamble -_begin_fstest auto quick send clone +_begin_fstest auto quick send clone fiemap # Override the default cleanup function. _cleanup()
tests/btrfs/211 +1 -1
@@ -10,7 +10,7 @@ # the NO_HOLES feature. # . ./common/preamble -_begin_fstest auto quick log prealloc +_begin_fstest auto quick log prealloc fiemap # Override the default cleanup function. _cleanup()
tests/btrfs/257 +1 -1
@@ -9,7 +9,7 @@ # . ./common/preamble -_begin_fstest auto quick defrag prealloc +_begin_fstest auto quick defrag prealloc fiemap # Override the default cleanup function. # _cleanup()
tests/btrfs/258 +1 -1
@@ -8,7 +8,7 @@ # in the middle # . ./common/preamble -_begin_fstest auto defrag quick +_begin_fstest auto defrag quick fiemap . ./common/filter
tests/btrfs/259 +1 -1
@@ -8,7 +8,7 @@ # at their max capacity. # . ./common/preamble -_begin_fstest auto quick defrag +_begin_fstest auto quick defrag fiemap # Import common functions. . ./common/filter
tests/btrfs/260 +1 -1
@@ -8,7 +8,7 @@ # algorithm of all regular extents. # . ./common/preamble -_begin_fstest auto quick defrag compress prealloc +_begin_fstest auto quick defrag compress prealloc fiemap # Override the default cleanup function. # _cleanup()
tests/btrfs/263 +1 -1
@@ -8,7 +8,7 @@ # defragmentation. # . ./common/preamble -_begin_fstest auto quick defrag +_begin_fstest auto quick defrag fiemap # Import common functions. . ./common/filter
tests/btrfs/276 +1 -1
@@ -9,7 +9,7 @@ # and when the file's subvolume was snapshoted. # . ./common/preamble -_begin_fstest auto snapshot compress +_begin_fstest auto snapshot compress fiemap . ./common/filter
tests/ext4/001 +1 -1
@@ -8,7 +8,7 @@ # seqfull=$0 . ./common/preamble -_begin_fstest auto prealloc quick zero +_begin_fstest auto prealloc quick zero fiemap # Import common functions. . ./common/filter
tests/ext4/034 +1 -1
@@ -11,7 +11,7 @@ # "ext4: make sure enough credits are reserved for dioread_nolock writes" # . ./common/preamble -_begin_fstest auto quick quota +_begin_fstest auto quick quota fiemap # Import common functions. . ./common/filter
tests/ext4/308 +1 -1
@@ -9,7 +9,7 @@ # So if ioctl was performed twice then inode's layout should not change. # . ./common/preamble -_begin_fstest auto ioctl rw prealloc quick defrag +_begin_fstest auto ioctl rw prealloc quick defrag fiemap PIDS=""
tests/f2fs/002 +1 -1
@@ -40,7 +40,7 @@ # just test LZ4. . ./common/preamble -_begin_fstest auto quick rw encrypt compress +_begin_fstest auto quick rw encrypt compress fiemap . ./common/filter . ./common/f2fs
tests/generic/009 +1 -1
@@ -7,7 +7,7 @@ # Test fallocate FALLOC_FL_ZERO_RANGE # . ./common/preamble -_begin_fstest auto quick prealloc zero +_begin_fstest auto quick prealloc zero fiemap # Import common functions. . ./common/filter
tests/generic/012 +1 -1
@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functions
tests/generic/016 +1 -1
@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functions
tests/generic/017 +1 -1
@@ -10,7 +10,7 @@ # Also check for file system consistency after completing this operation # for each blocksize. . ./common/preamble -_begin_fstest auto prealloc collapse +_begin_fstest auto prealloc collapse fiemap # Import common functions. . ./common/filter
tests/generic/021 +1 -1
@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functions
tests/generic/022 +1 -1
@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functions
tests/generic/032 +1 -1
@@ -11,7 +11,7 @@ # are always read back as zeroes. # . ./common/preamble -_begin_fstest auto quick rw +_begin_fstest auto quick rw fiemap # Override the default cleanup function. _cleanup()
tests/generic/043 +1 -1
@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filter
tests/generic/044 +1 -1
@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filter
tests/generic/045 +1 -1
@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filter
tests/generic/046 +1 -1
@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filter
tests/generic/047 +1 -1
@@ -8,7 +8,7 @@ # test inode size is on disk after fsync # . ./common/preamble -_begin_fstest shutdown metadata rw auto +_begin_fstest shutdown metadata rw auto fiemap # Import common functions. . ./common/filter
tests/generic/048 +1 -1
@@ -8,7 +8,7 @@ # test inode size is on disk after sync # . ./common/preamble -_begin_fstest shutdown metadata rw auto +_begin_fstest shutdown metadata rw auto fiemap # Import common functions. . ./common/filter
tests/generic/049 +1 -1
@@ -8,7 +8,7 @@ # test inode size is on disk after sync - expose log replay bug # . ./common/preamble -_begin_fstest shutdown metadata rw auto +_begin_fstest shutdown metadata rw auto fiemap # Import common functions. . ./common/filter
tests/generic/058 +1 -1
@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functions
tests/generic/060 +1 -1
@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functions
tests/generic/061 +1 -1
@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functions
tests/generic/063 +1 -1
@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functions
tests/generic/064 +1 -1
@@ -10,7 +10,7 @@ # on the previously inserted ranges to test merge code of collapse # range. Also check for data integrity and file system consistency. . ./common/preamble -_begin_fstest auto quick prealloc collapse insert +_begin_fstest auto quick prealloc collapse insert fiemap # Import common functions. . ./common/filter
tests/generic/092 +1 -1
@@ -12,7 +12,7 @@ # preallocated space. # . ./common/preamble -_begin_fstest auto quick prealloc +_begin_fstest auto quick prealloc fiemap status=0 # success is the default!
tests/generic/094 +1 -1
@@ -7,7 +7,7 @@ # Run the fiemap (file extent mapping) tester with preallocation enabled # . ./common/preamble -_begin_fstest auto quick prealloc +_begin_fstest auto quick prealloc fiemap # Import common functions. . ./common/filter
tests/generic/110 +1 -1
@@ -11,7 +11,7 @@ # - Modify the reflinked file # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()
tests/generic/111 +1 -1
@@ -12,7 +12,7 @@ # - Modify one of the copies # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()
tests/generic/115 +1 -1
@@ -10,7 +10,7 @@ # - Delete the original (moved) file, check that the copy still exists. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()
tests/generic/177 +1 -1
@@ -11,7 +11,7 @@ # This test is motivated by a bug found in btrfs. # . ./common/preamble -_begin_fstest auto quick prealloc metadata punch log +_begin_fstest auto quick prealloc metadata punch log fiemap # Override the default cleanup function. _cleanup()
tests/generic/225 +1 -1
@@ -7,7 +7,7 @@ # Run the fiemap (file extent mapping) tester # . ./common/preamble -_begin_fstest auto quick +_begin_fstest auto quick fiemap # Import common functions. . ./common/filter
tests/generic/255 +1 -1
@@ -7,7 +7,7 @@ # Test Generic fallocate hole punching # . ./common/preamble -_begin_fstest auto quick prealloc punch +_begin_fstest auto quick prealloc punch fiemap # Import common functions. . ./common/filter
tests/generic/301 +1 -1
@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/302 +1 -1
@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/305 +1 -1
@@ -8,7 +8,7 @@ # charged for buffered copy on write. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/316 +1 -1
@@ -7,7 +7,7 @@ # Test Generic fallocate hole punching w/o unwritten extent # . ./common/preamble -_begin_fstest auto quick punch +_begin_fstest auto quick punch fiemap # Import common functions. . ./common/filter
tests/generic/326 +1 -1
@@ -8,7 +8,7 @@ # charged for directio copy on write. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/327 +1 -1
@@ -7,7 +7,7 @@ # Ensure that we can't go over the hard block limit when reflinking. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/328 +1 -1
@@ -7,7 +7,7 @@ # Ensure that we can't go over the hard block limit when CoWing a file. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/352 +1 -1
@@ -11,7 +11,7 @@ # Which btrfs will soft lock up and return wrong shared flag. # . ./common/preamble -_begin_fstest auto clone +_begin_fstest auto clone fiemap # Import common functions. . ./common/filter
tests/generic/353 +1 -1
@@ -12,7 +12,7 @@ # This caused SHARED flag only occurs after sync. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/372 +1 -1
@@ -7,7 +7,7 @@ # Check that bmap/fiemap accurately report shared extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap _register_cleanup "_cleanup" BUS
tests/generic/414 +1 -1
@@ -8,7 +8,7 @@ # block mapping extent. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap _register_cleanup "_cleanup" BUS
tests/generic/425 +1 -1
@@ -8,7 +8,7 @@ # block to hold extended attributes. # . ./common/preamble -_begin_fstest auto quick attr +_begin_fstest auto quick attr fiemap _register_cleanup "_cleanup" BUS
tests/generic/473 +1 -1
@@ -9,7 +9,7 @@ # Also the test used 16k holes to be compatible with 16k block filesystems # . ./common/preamble -_begin_fstest broken +_begin_fstest broken fiemap # Import common functions. . ./common/punch
tests/generic/483 +1 -1
@@ -8,7 +8,7 @@ # are placed beyond a file's size. # . ./common/preamble -_begin_fstest auto quick log metadata +_begin_fstest auto quick log metadata fiemap # Override the default cleanup function. _cleanup()
tests/generic/516 +1 -1
@@ -9,7 +9,7 @@ # - Check that nothing changes in either file # . ./common/preamble -_begin_fstest auto quick dedupe clone +_begin_fstest auto quick dedupe clone fiemap # Override the default cleanup function. _cleanup()
tests/generic/519 +1 -1
@@ -8,7 +8,7 @@ # 79b3dbe4adb3 fs: fix iomap_bmap position calculation # . ./common/preamble -_begin_fstest auto quick +_begin_fstest auto quick fiemap # Import common functions. . ./common/filter
tests/generic/540 +1 -1
@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/541 +1 -1
@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/542 +1 -1
@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/543 +1 -1
@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/578 +1 -1
@@ -7,7 +7,7 @@ # Make sure that we can handle multiple mmap writers to the same file. . ./common/preamble -_begin_fstest auto quick rw clone +_begin_fstest auto quick rw clone fiemap # Override the default cleanup function. _cleanup()
tests/generic/654 +1 -1
@@ -10,7 +10,7 @@ # the golden output; we can only compare to a check file. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/655 +1 -1
@@ -11,7 +11,7 @@ # the golden output; we can only compare to a check file. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/generic/677 +1 -1
@@ -9,7 +9,7 @@ # after we mount the filesystem. # . ./common/preamble -_begin_fstest auto quick log prealloc +_begin_fstest auto quick log prealloc fiemap _cleanup() {
tests/generic/679 +1 -1
@@ -9,7 +9,7 @@ # space to allocate extents for the holes. # . ./common/preamble -_begin_fstest auto quick prealloc +_begin_fstest auto quick prealloc fiemap . ./common/filter . ./common/punch
tests/generic/695 +1 -1
@@ -12,7 +12,7 @@ # btrfs-progs 5.15). # . ./common/preamble -_begin_fstest auto quick log punch +_begin_fstest auto quick log punch fiemap _cleanup() {
tests/overlay/066 +1 -1
@@ -8,7 +8,7 @@ # Test overlayfs copy-up function for variant sparse files. # . ./common/preamble -_begin_fstest auto quick copyup +_begin_fstest auto quick copyup fiemap # Import common functions.. . ./common/filter
tests/shared/298 +1 -1
@@ -7,7 +7,7 @@ # Test that filesystem sends discard requests only on free blocks # . ./common/preamble -_begin_fstest auto trim +_begin_fstest auto trim fiemap _supported_fs ext4 xfs btrfs _require_test
tests/xfs/180 +1 -1
@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/182 +1 -1
@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/184 +1 -1
@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/192 +1 -1
@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/193 +1 -1
@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/198 +1 -1
@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/200 +1 -1
@@ -13,7 +13,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/204 +1 -1
@@ -13,7 +13,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/207 +1 -1
@@ -10,7 +10,7 @@ # - Ensure that whatever we set we get back later. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/208 +1 -1
@@ -14,7 +14,7 @@ # - Repeat, but with extsz = 1MB and cowextsz = $blocksize. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/209 +1 -1
@@ -7,7 +7,7 @@ # Make sure setting cowextsz on a directory propagates it to subfiles. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/210 +1 -1
@@ -11,7 +11,7 @@ # otherwise. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/211 +1 -1
@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest clone_stress +_begin_fstest clone_stress fiemap # Import common functions. . ./common/filter
tests/xfs/212 +1 -1
@@ -10,7 +10,7 @@ # - Crash the FS to test recovery. # . ./common/preamble -_begin_fstest shutdown auto quick clone +_begin_fstest shutdown auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/213 +1 -1
@@ -9,7 +9,7 @@ # play with cowextsz. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/214 +1 -1
@@ -9,7 +9,7 @@ # with cowextsz. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/231 +1 -1
@@ -12,7 +12,7 @@ # - Write more and see how bad fragmentation is. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()
tests/xfs/232 +1 -1
@@ -13,7 +13,7 @@ # - Write more and see how bad fragmentation is. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()
tests/xfs/252 +1 -1
@@ -7,7 +7,7 @@ # Test fallocate hole punching # . ./common/preamble -_begin_fstest auto quick prealloc punch +_begin_fstest auto quick prealloc punch fiemap # Import common functions. . ./common/filter
tests/xfs/344 +1 -1
@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/345 +1 -1
@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/346 +1 -1
@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/347 +1 -1
@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filter
tests/xfs/443 +1 -1
@@ -15,7 +15,7 @@ # accounting inconsistency. # . ./common/preamble -_begin_fstest auto quick ioctl fsr punch +_begin_fstest auto quick ioctl fsr punch fiemap # Import common functions. . ./common/filter
Signature · 1 line
2.35.1
Quoted 10 lines · On Fri, Oct 07, 2022 at 02:53:33PM +0100, [email protected] wrote:
From: Filipe Manana <[email protected]>
Add a new btrfs test case to exercise fiemap in the presence of a snapshot, and then add a fiemap test group, as well as some missing '
_require_xfs_io_command"fiemap"' calls in a few tests.Filipe Manana (3):
btrfs: test fiemap on large file with extents shared through a snapshot
fstests: add missing require ofxfs_iofiemap command to some tests
fstests: add fiemap group
Thanks for doing this! The 1st patch looks good to me, the 2nd is fine too. If you're hurry (Are you?) to have that btrfs test coverage, I can merge the 1st patch at first. Then keep other patch one more week. Due to it changes many other fs cases (although not big change:), I need time to check one by one, and I hope to see if there're more review points from others :)
Thanks,
Zorro
Quoted 106 lines
doc/group-names.txt | 1 + tests/btrfs/004 | 2 +- tests/btrfs/079 | 2 +- tests/btrfs/137 | 2 +- tests/btrfs/140 | 2 +- tests/btrfs/199 | 2 +- tests/btrfs/200 | 2 +- tests/btrfs/211 | 2 +- tests/btrfs/257 | 3 +- tests/btrfs/258 | 3 +- tests/btrfs/259 | 3 +- tests/btrfs/260 | 2 +- tests/btrfs/263 | 2 +- tests/btrfs/276 | 124 ++++++++++++++++++++++++++++++++++++++++++++ tests/btrfs/276.out | 16 ++++++ tests/ext4/001 | 2 +- tests/ext4/034 | 2 +- tests/ext4/308 | 2 +- tests/f2fs/002 | 2 +- tests/generic/009 | 2 +- tests/generic/012 | 2 +- tests/generic/016 | 2 +- tests/generic/017 | 2 +- tests/generic/021 | 2 +- tests/generic/022 | 2 +- tests/generic/032 | 2 +- tests/generic/043 | 2 +- tests/generic/044 | 2 +- tests/generic/045 | 2 +- tests/generic/046 | 2 +- tests/generic/047 | 2 +- tests/generic/048 | 2 +- tests/generic/049 | 2 +- tests/generic/058 | 2 +- tests/generic/060 | 2 +- tests/generic/061 | 2 +- tests/generic/063 | 2 +- tests/generic/064 | 2 +- tests/generic/092 | 2 +- tests/generic/094 | 2 +- tests/generic/110 | 2 +- tests/generic/111 | 2 +- tests/generic/115 | 2 +- tests/generic/177 | 2 +- tests/generic/225 | 2 +- tests/generic/255 | 2 +- tests/generic/301 | 2 +- tests/generic/302 | 2 +- tests/generic/305 | 2 +- tests/generic/316 | 2 +- tests/generic/326 | 2 +- tests/generic/327 | 2 +- tests/generic/328 | 2 +- tests/generic/352 | 2 +- tests/generic/353 | 2 +- tests/generic/372 | 2 +- tests/generic/414 | 2 +- tests/generic/425 | 2 +- tests/generic/473 | 2 +- tests/generic/483 | 2 +- tests/generic/516 | 2 +- tests/generic/519 | 2 +- tests/generic/540 | 2 +- tests/generic/541 | 2 +- tests/generic/542 | 2 +- tests/generic/543 | 2 +- tests/generic/578 | 2 +- tests/generic/654 | 2 +- tests/generic/655 | 2 +- tests/generic/677 | 2 +- tests/generic/679 | 2 +- tests/generic/695 | 2 +- tests/overlay/066 | 2 +- tests/shared/298 | 2 +- tests/xfs/180 | 2 +- tests/xfs/182 | 2 +- tests/xfs/184 | 2 +- tests/xfs/192 | 2 +- tests/xfs/193 | 2 +- tests/xfs/198 | 2 +- tests/xfs/200 | 2 +- tests/xfs/204 | 2 +- tests/xfs/207 | 2 +- tests/xfs/208 | 2 +- tests/xfs/209 | 2 +- tests/xfs/210 | 2 +- tests/xfs/211 | 2 +- tests/xfs/212 | 2 +- tests/xfs/213 | 2 +- tests/xfs/214 | 2 +- tests/xfs/231 | 2 +- tests/xfs/232 | 2 +- tests/xfs/252 | 2 +- tests/xfs/344 | 2 +- tests/xfs/345 | 2 +- tests/xfs/346 | 2 +- tests/xfs/347 | 2 +- tests/xfs/443 | 3 +- 98 files changed, 240 insertions(+), 95 deletions(-) create mode 100755 tests/btrfs/276 create mode 100644 tests/btrfs/276.outSignature · 1 line
2.35.1
Re: [PATCH 1/3] btrfs: test fiemap on large file with extents shared through a snapshot
In reply to [email protected]Quoted 6 lines · On Fri, Oct 07, 2022 at 02:53:34PM +0100, [email protected] wrote:
From: Filipe Manana <[email protected]>
Verify that fiemap correctly reports the sharedness of extents for a file with a very large number of extents, spanning many b+tree leaves in the fs tree, and when the file's subvolume was snapshoted.
Quoted 8 lines
Currently this passes on all kernel releases and its purpose is to prevent and detect regressions in the future, as this actually happened during recent development on the btrfs' fiemap related code. With this test we now have better coverage for fiemap when a file is shared through a snapshot.
Signed-off-by Filipe Manana <[email protected]>---
Looks good to me,
Quoted 161 lines
tests/btrfs/276 | 124 ++++++++++++++++++++++++++++++++++++++++++++ tests/btrfs/276.out | 16 ++++++ 2 files changed, 140 insertions(+) create mode 100755 tests/btrfs/276 create mode 100644 tests/btrfs/276.outtests/btrfs/276 new file +124
-0@@ -0,0 +1,124 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2022 SUSE Linux Products GmbH. All Rights Reserved. +# +# FS QA Test 276 +# +# Verify that fiemap correctly reports the sharedness of extents for a file with +# a very large number of extents, spanning many b+tree leaves in the fs tree, +# and when the file's subvolume was snapshoted. +# +. ./common/preamble +_begin_fstest auto snapshot compress + +. ./common/filter + +_supported_fs btrfs +_require_scratch +_require_xfs_io_command "fiemap" "ranged" + +_scratch_mkfs >> $seqres.full 2>&1 +# We use compression because it's a very quick way to create a file with a very +# large number of extents (compression limits the maximum extent size to 128K) +# and while using very little disk space. +_scratch_mount -o compress + +fiemap_test_file() +{ + local offset=$1 + local len=$2 + + # Skip the first two lines of xfs_io's fiemap output (file path and + # header describing the output columns). + $XFS_IO_PROG -c "fiemap -v $offset $len" $SCRATCH_MNT/foo | tail -n +3 +} + +# Count the number of shared extents for the whole test file or just for a given +# range. +count_shared_extents() +{ + local offset=$1 + local len=$2 + + # Column 5 (from xfs_io's "fiemap -v" command) is the flags (hex field). + # 0x2000 is the value for the FIEMAP_EXTENT_SHARED flag. + fiemap_test_file $offset $len | \ + $AWK_PROG --source 'BEGIN { cnt = 0 }' \ + --source '{ if (and(strtonum($5), 0x2000)) cnt++ }' \ + --source 'END { print cnt }' +} + +# Count the number of non shared extents for the whole test file or just for a +# given range. +count_not_shared_extents() +{ + local offset=$1 + local len=$2 + + # Column 5 (from xfs_io's "fiemap -v" command) is the flags (hex field). + # 0x2000 is the value for the FIEMAP_EXTENT_SHARED flag. + fiemap_test_file $offset $len | \ + $AWK_PROG --source 'BEGIN { cnt = 0 }' \ + --source '{ if (!and(strtonum($5), 0x2000)) cnt++ }' \ + --source 'END { print cnt }' +} + +# Create a 16G file as that results in 131072 extents, all with a size of 128K +# (due to compression), and a fs tree with a height of 3 (root node at level 2). +# We want to verify later that fiemap correctly reports the sharedness of each +# extent, even when it needs to switch from one leaf to the next one and from a +# node at level 1 to the next node at level 1. +# +$XFS_IO_PROG -f -c "pwrite -b 8M 0 16G" $SCRATCH_MNT/foo | _filter_xfs_io + +# Sync to flush delalloc and commit the current transaction, so fiemap will see +# all extents in the fs tree and extent trees and not look at delalloc. +sync + +# All extents should be reported as non shared (131072 extents). +echo "Number of non-shared extents in the whole file: $(count_not_shared_extents)" + +# Creating a snapshot. +$BTRFS_UTIL_PROG subvolume snapshot $SCRATCH_MNT $SCRATCH_MNT/snap | _filter_scratch + +# We have a snapshot, so now all extents should be reported as shared. +echo "Number of shared extents in the whole file: $(count_shared_extents)" + +# Now COW two file ranges, of 1M each, in the snapshot's file. +# So 16 extents should become non-shared after this. +# +$XFS_IO_PROG -c "pwrite -b 1M 8M 1M" \ + -c "pwrite -b 1M 12G 1M" \ + $SCRATCH_MNT/snap/foo | _filter_xfs_io + +# Sync to flush delalloc and commit the current transaction, so fiemap will see +# all extents in the fs tree and extent trees and not look at delalloc. +sync + +# Now we should have 16 non-shared extents and 131056 (131072 - 16) shared +# extents. +echo "Number of non-shared extents in the whole file: $(count_not_shared_extents)" +echo "Number of shared extents in the whole file: $(count_shared_extents)" + +# Check that the non-shared extents are indeed in the expected file ranges (each +# with 8 extents). +echo "Number of non-shared extents in range [8M, 9M): $(count_not_shared_extents 8M 1M)" +echo "Number of non-shared extents in range [12G, 12G + 1M): $(count_not_shared_extents 12G 1M)" + +# Now delete the snapshot. +$BTRFS_UTIL_PROG subvolume delete -c $SCRATCH_MNT/snap | _filter_scratch + +# We deleted the snapshot and committed the transaction used to delete it (-c), +# but all its extents (both metadata and data) are actually only deleted in the +# background, by the cleaner kthread. So remount, which wakes up the cleaner +# kthread, with a commit interval of 1 second and sleep for 1.1 seconds - after +# this we are guaranteed all extents of the snapshot were deleted. +_scratch_remount commit=1 +sleep 1.1 + +# Now all extents should be reported as not shared (131072 extents). +echo "Number of non-shared extents in the whole file: $(count_not_shared_extents)" + +# success, all done +status=0 +exittests/btrfs/276.out new file +16
-0@@ -0,0 +1,16 @@ +QA output created by 276 +wrote 17179869184/17179869184 bytes at offset 0 +XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Number of non-shared extents in the whole file: 131072 +Create a snapshot of 'SCRATCH_MNT' in 'SCRATCH_MNT/snap' +Number of shared extents in the whole file: 131072 +wrote 1048576/1048576 bytes at offset 8388608 +XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 1048576/1048576 bytes at offset 12884901888 +XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Number of non-shared extents in the whole file: 16 +Number of shared extents in the whole file: 131056 +Number of non-shared extents in range [8M, 9M): 8 +Number of non-shared extents in range [12G, 12G + 1M): 8 +Delete subvolume (commit): 'SCRATCH_MNT/snap' +Number of non-shared extents in the whole file: 131072Signature · 1 line
2.35.1
Re: [PATCH 3/3] fstests: add fiemap group
In reply to [email protected]Quoted 10 lines · On Fri, Oct 07, 2022 at 02:53:36PM +0100, [email protected] wrote:
From: Filipe Manana <[email protected]>
Add a fiemap group for all tests that exercise fiemap, either directly through
xfs_io, or more indirectly like through filefrag or helpers in common/* (like_count_extents,_count_holes, etc). This is useful in order to quickly test changes made to the fiemap implementation of a filesystem for example.Signed-off-by Filipe Manana <[email protected]>---
By checking each cases below, I think this patch is fine. Not only the "xfs_io -c fiemap", you count those cases which use "filefrag" in fiemap group too. I'm OK to accept that, so if there's not more review points, I'll merge this patch.
Quoted 1,362 lines
doc/group-names.txt | 1 + tests/btrfs/004 | 2 +- tests/btrfs/079 | 2 +- tests/btrfs/137 | 2 +- tests/btrfs/140 | 2 +- tests/btrfs/199 | 2 +- tests/btrfs/200 | 2 +- tests/btrfs/211 | 2 +- tests/btrfs/257 | 2 +- tests/btrfs/258 | 2 +- tests/btrfs/259 | 2 +- tests/btrfs/260 | 2 +- tests/btrfs/263 | 2 +- tests/btrfs/276 | 2 +- tests/ext4/001 | 2 +- tests/ext4/034 | 2 +- tests/ext4/308 | 2 +- tests/f2fs/002 | 2 +- tests/generic/009 | 2 +- tests/generic/012 | 2 +- tests/generic/016 | 2 +- tests/generic/017 | 2 +- tests/generic/021 | 2 +- tests/generic/022 | 2 +- tests/generic/032 | 2 +- tests/generic/043 | 2 +- tests/generic/044 | 2 +- tests/generic/045 | 2 +- tests/generic/046 | 2 +- tests/generic/047 | 2 +- tests/generic/048 | 2 +- tests/generic/049 | 2 +- tests/generic/058 | 2 +- tests/generic/060 | 2 +- tests/generic/061 | 2 +- tests/generic/063 | 2 +- tests/generic/064 | 2 +- tests/generic/092 | 2 +- tests/generic/094 | 2 +- tests/generic/110 | 2 +- tests/generic/111 | 2 +- tests/generic/115 | 2 +- tests/generic/177 | 2 +- tests/generic/225 | 2 +- tests/generic/255 | 2 +- tests/generic/301 | 2 +- tests/generic/302 | 2 +- tests/generic/305 | 2 +- tests/generic/316 | 2 +- tests/generic/326 | 2 +- tests/generic/327 | 2 +- tests/generic/328 | 2 +- tests/generic/352 | 2 +- tests/generic/353 | 2 +- tests/generic/372 | 2 +- tests/generic/414 | 2 +- tests/generic/425 | 2 +- tests/generic/473 | 2 +- tests/generic/483 | 2 +- tests/generic/516 | 2 +- tests/generic/519 | 2 +- tests/generic/540 | 2 +- tests/generic/541 | 2 +- tests/generic/542 | 2 +- tests/generic/543 | 2 +- tests/generic/578 | 2 +- tests/generic/654 | 2 +- tests/generic/655 | 2 +- tests/generic/677 | 2 +- tests/generic/679 | 2 +- tests/generic/695 | 2 +- tests/overlay/066 | 2 +- tests/shared/298 | 2 +- tests/xfs/180 | 2 +- tests/xfs/182 | 2 +- tests/xfs/184 | 2 +- tests/xfs/192 | 2 +- tests/xfs/193 | 2 +- tests/xfs/198 | 2 +- tests/xfs/200 | 2 +- tests/xfs/204 | 2 +- tests/xfs/207 | 2 +- tests/xfs/208 | 2 +- tests/xfs/209 | 2 +- tests/xfs/210 | 2 +- tests/xfs/211 | 2 +- tests/xfs/212 | 2 +- tests/xfs/213 | 2 +- tests/xfs/214 | 2 +- tests/xfs/231 | 2 +- tests/xfs/232 | 2 +- tests/xfs/252 | 2 +- tests/xfs/344 | 2 +- tests/xfs/345 | 2 +- tests/xfs/346 | 2 +- tests/xfs/347 | 2 +- tests/xfs/443 | 2 +- 97 files changed, 97 insertions(+), 96 deletions(-)doc/group-names.txt +1
-0@@ -47,6 +47,7 @@ eio IO error reporting encrypt encrypted file contents enospc ENOSPC error reporting exportfs file handles +fiemap fiemap ioctl filestreams XFS filestreams allocator freeze filesystem freeze tests fsck general fsck teststests/btrfs/004 +1
-1@@ -10,7 +10,7 @@ # We check to end up back at the original file with the correct offset. # . ./common/preamble -_begin_fstest auto rw metadata +_begin_fstest auto rw metadata fiemap noise_pid=0tests/btrfs/079 +1
-1@@ -18,7 +18,7 @@ # btrfs: Fix the wrong condition judgment about subset extent map # . ./common/preamble -_begin_fstest auto rw metadata +_begin_fstest auto rw metadata fiemap # Override the default cleanup function. _cleanup()tests/btrfs/137 +1
-1@@ -7,7 +7,7 @@ # Test that both incremental and full send operations preserve file holes. # . ./common/preamble -_begin_fstest auto quick send +_begin_fstest auto quick send fiemap # Override the default cleanup function. _cleanup()tests/btrfs/140 +1
-1@@ -12,7 +12,7 @@ # commit 2e949b0a5592 ("Btrfs: fix invalid dereference in btrfs_retry_endio") # . ./common/preamble -_begin_fstest auto quick read_repair +_begin_fstest auto quick read_repair fiemap # Import common functions. . ./common/filtertests/btrfs/199 +1
-1@@ -16,7 +16,7 @@ # boundary" # . ./common/preamble -_begin_fstest auto quick trim +_begin_fstest auto quick trim fiemap # Override the default cleanup function. _cleanup()tests/btrfs/200 +1
-1@@ -8,7 +8,7 @@ # operations for extents that are shared between the same file. # . ./common/preamble -_begin_fstest auto quick send clone +_begin_fstest auto quick send clone fiemap # Override the default cleanup function. _cleanup()tests/btrfs/211 +1
-1@@ -10,7 +10,7 @@ # the NO_HOLES feature. # . ./common/preamble -_begin_fstest auto quick log prealloc +_begin_fstest auto quick log prealloc fiemap # Override the default cleanup function. _cleanup()tests/btrfs/257 +1
-1@@ -9,7 +9,7 @@ # . ./common/preamble -_begin_fstest auto quick defrag prealloc +_begin_fstest auto quick defrag prealloc fiemap # Override the default cleanup function. # _cleanup()tests/btrfs/258 +1
-1@@ -8,7 +8,7 @@ # in the middle # . ./common/preamble -_begin_fstest auto defrag quick +_begin_fstest auto defrag quick fiemap . ./common/filtertests/btrfs/259 +1
-1@@ -8,7 +8,7 @@ # at their max capacity. # . ./common/preamble -_begin_fstest auto quick defrag +_begin_fstest auto quick defrag fiemap # Import common functions. . ./common/filtertests/btrfs/260 +1
-1@@ -8,7 +8,7 @@ # algorithm of all regular extents. # . ./common/preamble -_begin_fstest auto quick defrag compress prealloc +_begin_fstest auto quick defrag compress prealloc fiemap # Override the default cleanup function. # _cleanup()tests/btrfs/263 +1
-1@@ -8,7 +8,7 @@ # defragmentation. # . ./common/preamble -_begin_fstest auto quick defrag +_begin_fstest auto quick defrag fiemap # Import common functions. . ./common/filtertests/btrfs/276 +1
-1@@ -9,7 +9,7 @@ # and when the file's subvolume was snapshoted. # . ./common/preamble -_begin_fstest auto snapshot compress +_begin_fstest auto snapshot compress fiemap . ./common/filtertests/ext4/001 +1
-1@@ -8,7 +8,7 @@ # seqfull=$0 . ./common/preamble -_begin_fstest auto prealloc quick zero +_begin_fstest auto prealloc quick zero fiemap # Import common functions. . ./common/filtertests/ext4/034 +1
-1@@ -11,7 +11,7 @@ # "ext4: make sure enough credits are reserved for dioread_nolock writes" # . ./common/preamble -_begin_fstest auto quick quota +_begin_fstest auto quick quota fiemap # Import common functions. . ./common/filtertests/ext4/308 +1
-1@@ -9,7 +9,7 @@ # So if ioctl was performed twice then inode's layout should not change. # . ./common/preamble -_begin_fstest auto ioctl rw prealloc quick defrag +_begin_fstest auto ioctl rw prealloc quick defrag fiemap PIDS=""tests/f2fs/002 +1
-1@@ -40,7 +40,7 @@ # just test LZ4. . ./common/preamble -_begin_fstest auto quick rw encrypt compress +_begin_fstest auto quick rw encrypt compress fiemap . ./common/filter . ./common/f2fstests/generic/009 +1
-1@@ -7,7 +7,7 @@ # Test fallocate FALLOC_FL_ZERO_RANGE # . ./common/preamble -_begin_fstest auto quick prealloc zero +_begin_fstest auto quick prealloc zero fiemap # Import common functions. . ./common/filtertests/generic/012 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/016 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/017 +1
-1@@ -10,7 +10,7 @@ # Also check for file system consistency after completing this operation # for each blocksize. . ./common/preamble -_begin_fstest auto prealloc collapse +_begin_fstest auto prealloc collapse fiemap # Import common functions. . ./common/filtertests/generic/021 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/022 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/032 +1
-1@@ -11,7 +11,7 @@ # are always read back as zeroes. # . ./common/preamble -_begin_fstest auto quick rw +_begin_fstest auto quick rw fiemap # Override the default cleanup function. _cleanup()tests/generic/043 +1
-1@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filtertests/generic/044 +1
-1@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filtertests/generic/045 +1
-1@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filtertests/generic/046 +1
-1@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filtertests/generic/047 +1
-1@@ -8,7 +8,7 @@ # test inode size is on disk after fsync # . ./common/preamble -_begin_fstest shutdown metadata rw auto +_begin_fstest shutdown metadata rw auto fiemap # Import common functions. . ./common/filtertests/generic/048 +1
-1@@ -8,7 +8,7 @@ # test inode size is on disk after sync # . ./common/preamble -_begin_fstest shutdown metadata rw auto +_begin_fstest shutdown metadata rw auto fiemap # Import common functions. . ./common/filtertests/generic/049 +1
-1@@ -8,7 +8,7 @@ # test inode size is on disk after sync - expose log replay bug # . ./common/preamble -_begin_fstest shutdown metadata rw auto +_begin_fstest shutdown metadata rw auto fiemap # Import common functions. . ./common/filtertests/generic/058 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/060 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/061 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/063 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/064 +1
-1@@ -10,7 +10,7 @@ # on the previously inserted ranges to test merge code of collapse # range. Also check for data integrity and file system consistency. . ./common/preamble -_begin_fstest auto quick prealloc collapse insert +_begin_fstest auto quick prealloc collapse insert fiemap # Import common functions. . ./common/filtertests/generic/092 +1
-1@@ -12,7 +12,7 @@ # preallocated space. # . ./common/preamble -_begin_fstest auto quick prealloc +_begin_fstest auto quick prealloc fiemap status=0 # success is the default!tests/generic/094 +1
-1@@ -7,7 +7,7 @@ # Run the fiemap (file extent mapping) tester with preallocation enabled # . ./common/preamble -_begin_fstest auto quick prealloc +_begin_fstest auto quick prealloc fiemap # Import common functions. . ./common/filtertests/generic/110 +1
-1@@ -11,7 +11,7 @@ # - Modify the reflinked file # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/generic/111 +1
-1@@ -12,7 +12,7 @@ # - Modify one of the copies # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/generic/115 +1
-1@@ -10,7 +10,7 @@ # - Delete the original (moved) file, check that the copy still exists. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/generic/177 +1
-1@@ -11,7 +11,7 @@ # This test is motivated by a bug found in btrfs. # . ./common/preamble -_begin_fstest auto quick prealloc metadata punch log +_begin_fstest auto quick prealloc metadata punch log fiemap # Override the default cleanup function. _cleanup()tests/generic/225 +1
-1@@ -7,7 +7,7 @@ # Run the fiemap (file extent mapping) tester # . ./common/preamble -_begin_fstest auto quick +_begin_fstest auto quick fiemap # Import common functions. . ./common/filtertests/generic/255 +1
-1@@ -7,7 +7,7 @@ # Test Generic fallocate hole punching # . ./common/preamble -_begin_fstest auto quick prealloc punch +_begin_fstest auto quick prealloc punch fiemap # Import common functions. . ./common/filtertests/generic/301 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/302 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/305 +1
-1@@ -8,7 +8,7 @@ # charged for buffered copy on write. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/316 +1
-1@@ -7,7 +7,7 @@ # Test Generic fallocate hole punching w/o unwritten extent # . ./common/preamble -_begin_fstest auto quick punch +_begin_fstest auto quick punch fiemap # Import common functions. . ./common/filtertests/generic/326 +1
-1@@ -8,7 +8,7 @@ # charged for directio copy on write. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/327 +1
-1@@ -7,7 +7,7 @@ # Ensure that we can't go over the hard block limit when reflinking. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/328 +1
-1@@ -7,7 +7,7 @@ # Ensure that we can't go over the hard block limit when CoWing a file. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/352 +1
-1@@ -11,7 +11,7 @@ # Which btrfs will soft lock up and return wrong shared flag. # . ./common/preamble -_begin_fstest auto clone +_begin_fstest auto clone fiemap # Import common functions. . ./common/filtertests/generic/353 +1
-1@@ -12,7 +12,7 @@ # This caused SHARED flag only occurs after sync. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/372 +1
-1@@ -7,7 +7,7 @@ # Check that bmap/fiemap accurately report shared extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap _register_cleanup "_cleanup" BUStests/generic/414 +1
-1@@ -8,7 +8,7 @@ # block mapping extent. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap _register_cleanup "_cleanup" BUStests/generic/425 +1
-1@@ -8,7 +8,7 @@ # block to hold extended attributes. # . ./common/preamble -_begin_fstest auto quick attr +_begin_fstest auto quick attr fiemap _register_cleanup "_cleanup" BUStests/generic/473 +1
-1@@ -9,7 +9,7 @@ # Also the test used 16k holes to be compatible with 16k block filesystems # . ./common/preamble -_begin_fstest broken +_begin_fstest broken fiemap # Import common functions. . ./common/punchtests/generic/483 +1
-1@@ -8,7 +8,7 @@ # are placed beyond a file's size. # . ./common/preamble -_begin_fstest auto quick log metadata +_begin_fstest auto quick log metadata fiemap # Override the default cleanup function. _cleanup()tests/generic/516 +1
-1@@ -9,7 +9,7 @@ # - Check that nothing changes in either file # . ./common/preamble -_begin_fstest auto quick dedupe clone +_begin_fstest auto quick dedupe clone fiemap # Override the default cleanup function. _cleanup()tests/generic/519 +1
-1@@ -8,7 +8,7 @@ # 79b3dbe4adb3 fs: fix iomap_bmap position calculation # . ./common/preamble -_begin_fstest auto quick +_begin_fstest auto quick fiemap # Import common functions. . ./common/filtertests/generic/540 +1
-1@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/541 +1
-1@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/542 +1
-1@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/543 +1
-1@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/578 +1
-1@@ -7,7 +7,7 @@ # Make sure that we can handle multiple mmap writers to the same file. . ./common/preamble -_begin_fstest auto quick rw clone +_begin_fstest auto quick rw clone fiemap # Override the default cleanup function. _cleanup()tests/generic/654 +1
-1@@ -10,7 +10,7 @@ # the golden output; we can only compare to a check file. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/655 +1
-1@@ -11,7 +11,7 @@ # the golden output; we can only compare to a check file. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/677 +1
-1@@ -9,7 +9,7 @@ # after we mount the filesystem. # . ./common/preamble -_begin_fstest auto quick log prealloc +_begin_fstest auto quick log prealloc fiemap _cleanup() {tests/generic/679 +1
-1@@ -9,7 +9,7 @@ # space to allocate extents for the holes. # . ./common/preamble -_begin_fstest auto quick prealloc +_begin_fstest auto quick prealloc fiemap . ./common/filter . ./common/punchtests/generic/695 +1
-1@@ -12,7 +12,7 @@ # btrfs-progs 5.15). # . ./common/preamble -_begin_fstest auto quick log punch +_begin_fstest auto quick log punch fiemap _cleanup() {tests/overlay/066 +1
-1@@ -8,7 +8,7 @@ # Test overlayfs copy-up function for variant sparse files. # . ./common/preamble -_begin_fstest auto quick copyup +_begin_fstest auto quick copyup fiemap # Import common functions.. . ./common/filtertests/shared/298 +1
-1@@ -7,7 +7,7 @@ # Test that filesystem sends discard requests only on free blocks # . ./common/preamble -_begin_fstest auto trim +_begin_fstest auto trim fiemap _supported_fs ext4 xfs btrfs _require_testtests/xfs/180 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/182 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/184 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/192 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/193 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/198 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/200 +1
-1@@ -13,7 +13,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/204 +1
-1@@ -13,7 +13,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/207 +1
-1@@ -10,7 +10,7 @@ # - Ensure that whatever we set we get back later. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/208 +1
-1@@ -14,7 +14,7 @@ # - Repeat, but with extsz = 1MB and cowextsz = $blocksize. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/209 +1
-1@@ -7,7 +7,7 @@ # Make sure setting cowextsz on a directory propagates it to subfiles. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/210 +1
-1@@ -11,7 +11,7 @@ # otherwise. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/211 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest clone_stress +_begin_fstest clone_stress fiemap # Import common functions. . ./common/filtertests/xfs/212 +1
-1@@ -10,7 +10,7 @@ # - Crash the FS to test recovery. # . ./common/preamble -_begin_fstest shutdown auto quick clone +_begin_fstest shutdown auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/213 +1
-1@@ -9,7 +9,7 @@ # play with cowextsz. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/214 +1
-1@@ -9,7 +9,7 @@ # with cowextsz. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/231 +1
-1@@ -12,7 +12,7 @@ # - Write more and see how bad fragmentation is. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/xfs/232 +1
-1@@ -13,7 +13,7 @@ # - Write more and see how bad fragmentation is. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/xfs/252 +1
-1@@ -7,7 +7,7 @@ # Test fallocate hole punching # . ./common/preamble -_begin_fstest auto quick prealloc punch +_begin_fstest auto quick prealloc punch fiemap # Import common functions. . ./common/filtertests/xfs/344 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/345 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/346 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/347 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/443 +1
-1@@ -15,7 +15,7 @@ # accounting inconsistency. # . ./common/preamble -_begin_fstest auto quick ioctl fsr punch +_begin_fstest auto quick ioctl fsr punch fiemap # Import common functions. . ./common/filterSignature · 1 line
2.35.1
Re: [PATCH 2/3] fstests: add missing require of xfs_io fiemap command to some tests
In reply to [email protected]Quoted 8 lines · On Fri, Oct 07, 2022 at 02:53:35PM +0100, [email protected] wrote:
From: Filipe Manana <[email protected]>
btrfs/257, btrfs/258, btrfs/259 and xfs/443 use the fiemap command of
xfs_iobut don't do a '_require_xfs_io_command"fiemap"'. So add the missing requirement.Signed-off-by Filipe Manana <[email protected]>---
Make sense,
Quoted 57 lines
tests/btrfs/257 | 1 + tests/btrfs/258 | 1 + tests/btrfs/259 | 1 + tests/xfs/443 | 1 + 4 files changed, 4 insertions(+)tests/btrfs/257 +1
-0@@ -33,6 +33,7 @@ _require_btrfs_no_compress # Needs 4K sectorsize _require_btrfs_support_sectorsize 4096 _require_xfs_io_command "falloc" +_require_xfs_io_command "fiemap" _scratch_mkfs -s 4k >> $seqres.full 2>&1tests/btrfs/258 +1
-0@@ -17,6 +17,7 @@ _begin_fstest auto defrag quick # Modify as appropriate. _supported_fs generic _require_scratch +_require_xfs_io_command "fiemap" # Needs 4K sectorsize, as larger sectorsize can change the file layout. _require_btrfs_support_sectorsize 4096tests/btrfs/259 +1
-0@@ -18,6 +18,7 @@ _begin_fstest auto quick defrag # Modify as appropriate. _supported_fs btrfs _require_scratch +_require_xfs_io_command "fiemap" _scratch_mkfs >> $seqres.fulltests/xfs/443 +1
-0@@ -30,6 +30,7 @@ _require_test_program "punch-alternating" _require_xfs_io_command "falloc" _require_xfs_io_command "fpunch" _require_xfs_io_command "swapext" +_require_xfs_io_command "fiemap" _scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs _scratch_mountSignature · 1 line
2.35.1
Re: [PATCH 2/3] fstests: add missing require of xfs_io fiemap command to some tests
In reply to [email protected]Quoted 7 lines · On Fri, Oct 07, 2022 at 02:53:35PM +0100, [email protected] wrote:
From: Filipe Manana <[email protected]>
btrfs/257, btrfs/258, btrfs/259 and xfs/443 use the fiemap command of
xfs_iobut don't do a '_require_xfs_io_command"fiemap"'. So add the missing requirement.Signed-off-by Filipe Manana <[email protected]>
Yep
--D
Quoted 58 lines
--- tests/btrfs/257 | 1 + tests/btrfs/258 | 1 + tests/btrfs/259 | 1 + tests/xfs/443 | 1 + 4 files changed, 4 insertions(+)tests/btrfs/257 +1
-0@@ -33,6 +33,7 @@ _require_btrfs_no_compress # Needs 4K sectorsize _require_btrfs_support_sectorsize 4096 _require_xfs_io_command "falloc" +_require_xfs_io_command "fiemap" _scratch_mkfs -s 4k >> $seqres.full 2>&1tests/btrfs/258 +1
-0@@ -17,6 +17,7 @@ _begin_fstest auto defrag quick # Modify as appropriate. _supported_fs generic _require_scratch +_require_xfs_io_command "fiemap" # Needs 4K sectorsize, as larger sectorsize can change the file layout. _require_btrfs_support_sectorsize 4096tests/btrfs/259 +1
-0@@ -18,6 +18,7 @@ _begin_fstest auto quick defrag # Modify as appropriate. _supported_fs btrfs _require_scratch +_require_xfs_io_command "fiemap" _scratch_mkfs >> $seqres.fulltests/xfs/443 +1
-0@@ -30,6 +30,7 @@ _require_test_program "punch-alternating" _require_xfs_io_command "falloc" _require_xfs_io_command "fpunch" _require_xfs_io_command "swapext" +_require_xfs_io_command "fiemap" _scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs _scratch_mountSignature · 1 line
2.35.1
Re: [PATCH 3/3] fstests: add fiemap group
In reply to [email protected]Quoted 9 lines · On Fri, Oct 07, 2022 at 02:53:36PM +0100, [email protected] wrote:
From: Filipe Manana <[email protected]>
Add a fiemap group for all tests that exercise fiemap, either directly through
xfs_io, or more indirectly like through filefrag or helpers in common/* (like_count_extents,_count_holes, etc). This is useful in order to quickly test changes made to the fiemap implementation of a filesystem for example.Signed-off-by Filipe Manana <[email protected]>
Seems like a good idea to me
--D
Quoted 1,363 lines
--- doc/group-names.txt | 1 + tests/btrfs/004 | 2 +- tests/btrfs/079 | 2 +- tests/btrfs/137 | 2 +- tests/btrfs/140 | 2 +- tests/btrfs/199 | 2 +- tests/btrfs/200 | 2 +- tests/btrfs/211 | 2 +- tests/btrfs/257 | 2 +- tests/btrfs/258 | 2 +- tests/btrfs/259 | 2 +- tests/btrfs/260 | 2 +- tests/btrfs/263 | 2 +- tests/btrfs/276 | 2 +- tests/ext4/001 | 2 +- tests/ext4/034 | 2 +- tests/ext4/308 | 2 +- tests/f2fs/002 | 2 +- tests/generic/009 | 2 +- tests/generic/012 | 2 +- tests/generic/016 | 2 +- tests/generic/017 | 2 +- tests/generic/021 | 2 +- tests/generic/022 | 2 +- tests/generic/032 | 2 +- tests/generic/043 | 2 +- tests/generic/044 | 2 +- tests/generic/045 | 2 +- tests/generic/046 | 2 +- tests/generic/047 | 2 +- tests/generic/048 | 2 +- tests/generic/049 | 2 +- tests/generic/058 | 2 +- tests/generic/060 | 2 +- tests/generic/061 | 2 +- tests/generic/063 | 2 +- tests/generic/064 | 2 +- tests/generic/092 | 2 +- tests/generic/094 | 2 +- tests/generic/110 | 2 +- tests/generic/111 | 2 +- tests/generic/115 | 2 +- tests/generic/177 | 2 +- tests/generic/225 | 2 +- tests/generic/255 | 2 +- tests/generic/301 | 2 +- tests/generic/302 | 2 +- tests/generic/305 | 2 +- tests/generic/316 | 2 +- tests/generic/326 | 2 +- tests/generic/327 | 2 +- tests/generic/328 | 2 +- tests/generic/352 | 2 +- tests/generic/353 | 2 +- tests/generic/372 | 2 +- tests/generic/414 | 2 +- tests/generic/425 | 2 +- tests/generic/473 | 2 +- tests/generic/483 | 2 +- tests/generic/516 | 2 +- tests/generic/519 | 2 +- tests/generic/540 | 2 +- tests/generic/541 | 2 +- tests/generic/542 | 2 +- tests/generic/543 | 2 +- tests/generic/578 | 2 +- tests/generic/654 | 2 +- tests/generic/655 | 2 +- tests/generic/677 | 2 +- tests/generic/679 | 2 +- tests/generic/695 | 2 +- tests/overlay/066 | 2 +- tests/shared/298 | 2 +- tests/xfs/180 | 2 +- tests/xfs/182 | 2 +- tests/xfs/184 | 2 +- tests/xfs/192 | 2 +- tests/xfs/193 | 2 +- tests/xfs/198 | 2 +- tests/xfs/200 | 2 +- tests/xfs/204 | 2 +- tests/xfs/207 | 2 +- tests/xfs/208 | 2 +- tests/xfs/209 | 2 +- tests/xfs/210 | 2 +- tests/xfs/211 | 2 +- tests/xfs/212 | 2 +- tests/xfs/213 | 2 +- tests/xfs/214 | 2 +- tests/xfs/231 | 2 +- tests/xfs/232 | 2 +- tests/xfs/252 | 2 +- tests/xfs/344 | 2 +- tests/xfs/345 | 2 +- tests/xfs/346 | 2 +- tests/xfs/347 | 2 +- tests/xfs/443 | 2 +- 97 files changed, 97 insertions(+), 96 deletions(-)doc/group-names.txt +1
-0@@ -47,6 +47,7 @@ eio IO error reporting encrypt encrypted file contents enospc ENOSPC error reporting exportfs file handles +fiemap fiemap ioctl filestreams XFS filestreams allocator freeze filesystem freeze tests fsck general fsck teststests/btrfs/004 +1
-1@@ -10,7 +10,7 @@ # We check to end up back at the original file with the correct offset. # . ./common/preamble -_begin_fstest auto rw metadata +_begin_fstest auto rw metadata fiemap noise_pid=0tests/btrfs/079 +1
-1@@ -18,7 +18,7 @@ # btrfs: Fix the wrong condition judgment about subset extent map # . ./common/preamble -_begin_fstest auto rw metadata +_begin_fstest auto rw metadata fiemap # Override the default cleanup function. _cleanup()tests/btrfs/137 +1
-1@@ -7,7 +7,7 @@ # Test that both incremental and full send operations preserve file holes. # . ./common/preamble -_begin_fstest auto quick send +_begin_fstest auto quick send fiemap # Override the default cleanup function. _cleanup()tests/btrfs/140 +1
-1@@ -12,7 +12,7 @@ # commit 2e949b0a5592 ("Btrfs: fix invalid dereference in btrfs_retry_endio") # . ./common/preamble -_begin_fstest auto quick read_repair +_begin_fstest auto quick read_repair fiemap # Import common functions. . ./common/filtertests/btrfs/199 +1
-1@@ -16,7 +16,7 @@ # boundary" # . ./common/preamble -_begin_fstest auto quick trim +_begin_fstest auto quick trim fiemap # Override the default cleanup function. _cleanup()tests/btrfs/200 +1
-1@@ -8,7 +8,7 @@ # operations for extents that are shared between the same file. # . ./common/preamble -_begin_fstest auto quick send clone +_begin_fstest auto quick send clone fiemap # Override the default cleanup function. _cleanup()tests/btrfs/211 +1
-1@@ -10,7 +10,7 @@ # the NO_HOLES feature. # . ./common/preamble -_begin_fstest auto quick log prealloc +_begin_fstest auto quick log prealloc fiemap # Override the default cleanup function. _cleanup()tests/btrfs/257 +1
-1@@ -9,7 +9,7 @@ # . ./common/preamble -_begin_fstest auto quick defrag prealloc +_begin_fstest auto quick defrag prealloc fiemap # Override the default cleanup function. # _cleanup()tests/btrfs/258 +1
-1@@ -8,7 +8,7 @@ # in the middle # . ./common/preamble -_begin_fstest auto defrag quick +_begin_fstest auto defrag quick fiemap . ./common/filtertests/btrfs/259 +1
-1@@ -8,7 +8,7 @@ # at their max capacity. # . ./common/preamble -_begin_fstest auto quick defrag +_begin_fstest auto quick defrag fiemap # Import common functions. . ./common/filtertests/btrfs/260 +1
-1@@ -8,7 +8,7 @@ # algorithm of all regular extents. # . ./common/preamble -_begin_fstest auto quick defrag compress prealloc +_begin_fstest auto quick defrag compress prealloc fiemap # Override the default cleanup function. # _cleanup()tests/btrfs/263 +1
-1@@ -8,7 +8,7 @@ # defragmentation. # . ./common/preamble -_begin_fstest auto quick defrag +_begin_fstest auto quick defrag fiemap # Import common functions. . ./common/filtertests/btrfs/276 +1
-1@@ -9,7 +9,7 @@ # and when the file's subvolume was snapshoted. # . ./common/preamble -_begin_fstest auto snapshot compress +_begin_fstest auto snapshot compress fiemap . ./common/filtertests/ext4/001 +1
-1@@ -8,7 +8,7 @@ # seqfull=$0 . ./common/preamble -_begin_fstest auto prealloc quick zero +_begin_fstest auto prealloc quick zero fiemap # Import common functions. . ./common/filtertests/ext4/034 +1
-1@@ -11,7 +11,7 @@ # "ext4: make sure enough credits are reserved for dioread_nolock writes" # . ./common/preamble -_begin_fstest auto quick quota +_begin_fstest auto quick quota fiemap # Import common functions. . ./common/filtertests/ext4/308 +1
-1@@ -9,7 +9,7 @@ # So if ioctl was performed twice then inode's layout should not change. # . ./common/preamble -_begin_fstest auto ioctl rw prealloc quick defrag +_begin_fstest auto ioctl rw prealloc quick defrag fiemap PIDS=""tests/f2fs/002 +1
-1@@ -40,7 +40,7 @@ # just test LZ4. . ./common/preamble -_begin_fstest auto quick rw encrypt compress +_begin_fstest auto quick rw encrypt compress fiemap . ./common/filter . ./common/f2fstests/generic/009 +1
-1@@ -7,7 +7,7 @@ # Test fallocate FALLOC_FL_ZERO_RANGE # . ./common/preamble -_begin_fstest auto quick prealloc zero +_begin_fstest auto quick prealloc zero fiemap # Import common functions. . ./common/filtertests/generic/012 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/016 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/017 +1
-1@@ -10,7 +10,7 @@ # Also check for file system consistency after completing this operation # for each blocksize. . ./common/preamble -_begin_fstest auto prealloc collapse +_begin_fstest auto prealloc collapse fiemap # Import common functions. . ./common/filtertests/generic/021 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/022 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch collapse +_begin_fstest auto quick prealloc punch collapse fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/032 +1
-1@@ -11,7 +11,7 @@ # are always read back as zeroes. # . ./common/preamble -_begin_fstest auto quick rw +_begin_fstest auto quick rw fiemap # Override the default cleanup function. _cleanup()tests/generic/043 +1
-1@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filtertests/generic/044 +1
-1@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filtertests/generic/045 +1
-1@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filtertests/generic/046 +1
-1@@ -7,7 +7,7 @@ # Test for NULL files problem # . ./common/preamble -_begin_fstest shutdown metadata log auto +_begin_fstest shutdown metadata log auto fiemap # Import common functions. . ./common/filtertests/generic/047 +1
-1@@ -8,7 +8,7 @@ # test inode size is on disk after fsync # . ./common/preamble -_begin_fstest shutdown metadata rw auto +_begin_fstest shutdown metadata rw auto fiemap # Import common functions. . ./common/filtertests/generic/048 +1
-1@@ -8,7 +8,7 @@ # test inode size is on disk after sync # . ./common/preamble -_begin_fstest shutdown metadata rw auto +_begin_fstest shutdown metadata rw auto fiemap # Import common functions. . ./common/filtertests/generic/049 +1
-1@@ -8,7 +8,7 @@ # test inode size is on disk after sync - expose log replay bug # . ./common/preamble -_begin_fstest shutdown metadata rw auto +_begin_fstest shutdown metadata rw auto fiemap # Import common functions. . ./common/filtertests/generic/058 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/060 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/061 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/063 +1
-1@@ -11,7 +11,7 @@ # For the type of tests, check the description of _test_generic_punch # in common/rc. . ./common/preamble -_begin_fstest auto quick prealloc punch insert +_begin_fstest auto quick prealloc punch insert fiemap # Import common functions. # we need to include common/punch to get defination fo filter functionstests/generic/064 +1
-1@@ -10,7 +10,7 @@ # on the previously inserted ranges to test merge code of collapse # range. Also check for data integrity and file system consistency. . ./common/preamble -_begin_fstest auto quick prealloc collapse insert +_begin_fstest auto quick prealloc collapse insert fiemap # Import common functions. . ./common/filtertests/generic/092 +1
-1@@ -12,7 +12,7 @@ # preallocated space. # . ./common/preamble -_begin_fstest auto quick prealloc +_begin_fstest auto quick prealloc fiemap status=0 # success is the default!tests/generic/094 +1
-1@@ -7,7 +7,7 @@ # Run the fiemap (file extent mapping) tester with preallocation enabled # . ./common/preamble -_begin_fstest auto quick prealloc +_begin_fstest auto quick prealloc fiemap # Import common functions. . ./common/filtertests/generic/110 +1
-1@@ -11,7 +11,7 @@ # - Modify the reflinked file # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/generic/111 +1
-1@@ -12,7 +12,7 @@ # - Modify one of the copies # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/generic/115 +1
-1@@ -10,7 +10,7 @@ # - Delete the original (moved) file, check that the copy still exists. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/generic/177 +1
-1@@ -11,7 +11,7 @@ # This test is motivated by a bug found in btrfs. # . ./common/preamble -_begin_fstest auto quick prealloc metadata punch log +_begin_fstest auto quick prealloc metadata punch log fiemap # Override the default cleanup function. _cleanup()tests/generic/225 +1
-1@@ -7,7 +7,7 @@ # Run the fiemap (file extent mapping) tester # . ./common/preamble -_begin_fstest auto quick +_begin_fstest auto quick fiemap # Import common functions. . ./common/filtertests/generic/255 +1
-1@@ -7,7 +7,7 @@ # Test Generic fallocate hole punching # . ./common/preamble -_begin_fstest auto quick prealloc punch +_begin_fstest auto quick prealloc punch fiemap # Import common functions. . ./common/filtertests/generic/301 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/302 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/305 +1
-1@@ -8,7 +8,7 @@ # charged for buffered copy on write. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/316 +1
-1@@ -7,7 +7,7 @@ # Test Generic fallocate hole punching w/o unwritten extent # . ./common/preamble -_begin_fstest auto quick punch +_begin_fstest auto quick punch fiemap # Import common functions. . ./common/filtertests/generic/326 +1
-1@@ -8,7 +8,7 @@ # charged for directio copy on write. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/327 +1
-1@@ -7,7 +7,7 @@ # Ensure that we can't go over the hard block limit when reflinking. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/328 +1
-1@@ -7,7 +7,7 @@ # Ensure that we can't go over the hard block limit when CoWing a file. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/352 +1
-1@@ -11,7 +11,7 @@ # Which btrfs will soft lock up and return wrong shared flag. # . ./common/preamble -_begin_fstest auto clone +_begin_fstest auto clone fiemap # Import common functions. . ./common/filtertests/generic/353 +1
-1@@ -12,7 +12,7 @@ # This caused SHARED flag only occurs after sync. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/372 +1
-1@@ -7,7 +7,7 @@ # Check that bmap/fiemap accurately report shared extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap _register_cleanup "_cleanup" BUStests/generic/414 +1
-1@@ -8,7 +8,7 @@ # block mapping extent. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap _register_cleanup "_cleanup" BUStests/generic/425 +1
-1@@ -8,7 +8,7 @@ # block to hold extended attributes. # . ./common/preamble -_begin_fstest auto quick attr +_begin_fstest auto quick attr fiemap _register_cleanup "_cleanup" BUStests/generic/473 +1
-1@@ -9,7 +9,7 @@ # Also the test used 16k holes to be compatible with 16k block filesystems # . ./common/preamble -_begin_fstest broken +_begin_fstest broken fiemap # Import common functions. . ./common/punchtests/generic/483 +1
-1@@ -8,7 +8,7 @@ # are placed beyond a file's size. # . ./common/preamble -_begin_fstest auto quick log metadata +_begin_fstest auto quick log metadata fiemap # Override the default cleanup function. _cleanup()tests/generic/516 +1
-1@@ -9,7 +9,7 @@ # - Check that nothing changes in either file # . ./common/preamble -_begin_fstest auto quick dedupe clone +_begin_fstest auto quick dedupe clone fiemap # Override the default cleanup function. _cleanup()tests/generic/519 +1
-1@@ -8,7 +8,7 @@ # 79b3dbe4adb3 fs: fix iomap_bmap position calculation # . ./common/preamble -_begin_fstest auto quick +_begin_fstest auto quick fiemap # Import common functions. . ./common/filtertests/generic/540 +1
-1@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/541 +1
-1@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/542 +1
-1@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/543 +1
-1@@ -17,7 +17,7 @@ # - Check that the files are now different where we say they're different. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/578 +1
-1@@ -7,7 +7,7 @@ # Make sure that we can handle multiple mmap writers to the same file. . ./common/preamble -_begin_fstest auto quick rw clone +_begin_fstest auto quick rw clone fiemap # Override the default cleanup function. _cleanup()tests/generic/654 +1
-1@@ -10,7 +10,7 @@ # the golden output; we can only compare to a check file. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/655 +1
-1@@ -11,7 +11,7 @@ # the golden output; we can only compare to a check file. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/generic/677 +1
-1@@ -9,7 +9,7 @@ # after we mount the filesystem. # . ./common/preamble -_begin_fstest auto quick log prealloc +_begin_fstest auto quick log prealloc fiemap _cleanup() {tests/generic/679 +1
-1@@ -9,7 +9,7 @@ # space to allocate extents for the holes. # . ./common/preamble -_begin_fstest auto quick prealloc +_begin_fstest auto quick prealloc fiemap . ./common/filter . ./common/punchtests/generic/695 +1
-1@@ -12,7 +12,7 @@ # btrfs-progs 5.15). # . ./common/preamble -_begin_fstest auto quick log punch +_begin_fstest auto quick log punch fiemap _cleanup() {tests/overlay/066 +1
-1@@ -8,7 +8,7 @@ # Test overlayfs copy-up function for variant sparse files. # . ./common/preamble -_begin_fstest auto quick copyup +_begin_fstest auto quick copyup fiemap # Import common functions.. . ./common/filtertests/shared/298 +1
-1@@ -7,7 +7,7 @@ # Test that filesystem sends discard requests only on free blocks # . ./common/preamble -_begin_fstest auto trim +_begin_fstest auto trim fiemap _supported_fs ext4 xfs btrfs _require_testtests/xfs/180 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/182 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/184 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/192 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/193 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/198 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/200 +1
-1@@ -13,7 +13,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/204 +1
-1@@ -13,7 +13,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/207 +1
-1@@ -10,7 +10,7 @@ # - Ensure that whatever we set we get back later. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/208 +1
-1@@ -14,7 +14,7 @@ # - Repeat, but with extsz = 1MB and cowextsz = $blocksize. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/209 +1
-1@@ -7,7 +7,7 @@ # Make sure setting cowextsz on a directory propagates it to subfiles. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/210 +1
-1@@ -11,7 +11,7 @@ # otherwise. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/211 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest clone_stress +_begin_fstest clone_stress fiemap # Import common functions. . ./common/filtertests/xfs/212 +1
-1@@ -10,7 +10,7 @@ # - Crash the FS to test recovery. # . ./common/preamble -_begin_fstest shutdown auto quick clone +_begin_fstest shutdown auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/213 +1
-1@@ -9,7 +9,7 @@ # play with cowextsz. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/214 +1
-1@@ -9,7 +9,7 @@ # with cowextsz. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/231 +1
-1@@ -12,7 +12,7 @@ # - Write more and see how bad fragmentation is. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/xfs/232 +1
-1@@ -13,7 +13,7 @@ # - Write more and see how bad fragmentation is. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Override the default cleanup function. _cleanup()tests/xfs/252 +1
-1@@ -7,7 +7,7 @@ # Test fallocate hole punching # . ./common/preamble -_begin_fstest auto quick prealloc punch +_begin_fstest auto quick prealloc punch fiemap # Import common functions. . ./common/filtertests/xfs/344 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/345 +1
-1@@ -10,7 +10,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/346 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/347 +1
-1@@ -11,7 +11,7 @@ # - Check the number of extents. # . ./common/preamble -_begin_fstest auto quick clone +_begin_fstest auto quick clone fiemap # Import common functions. . ./common/filtertests/xfs/443 +1
-1@@ -15,7 +15,7 @@ # accounting inconsistency. # . ./common/preamble -_begin_fstest auto quick ioctl fsr punch +_begin_fstest auto quick ioctl fsr punch fiemap # Import common functions. . ./common/filterSignature · 1 line
2.35.1