mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
73beac7013
We were testing when the source file offset starts at EOF or beyond, but not when the destination offset is beyond EOF or when the destination offset is smaller than EOF but destination offset plus dedup length is greater than EOF. This is motivated by a bug in btrfs' extent_same (dedup) ioctl where we allowed the destination offset to start at EOF and beyond (and destination offset + length beyond EOF) for the case where the source and destination files are the same (was not allowed for different files used as source and destination). This also made the file's metadata inconsistent when the dedup operation succeeded, which happened when the source range corresponded to a file hole, prealloc extent or a data extent filled with zeroes. The btrfs issue is fixed by the following patch for the linux kernel: "Btrfs: fix extent_same allowing destination offset beyond i_size" Signed-off-by: Filipe Manana <fdmanana@suse.com> [darrick.wong@oracle.com: fix merge conflicts with latest reflink patchbomb] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
28 lines
768 B
Plaintext
28 lines
768 B
Plaintext
QA output created by 158
|
|
Format and mount
|
|
Create the original files
|
|
Try cross-device dedupe
|
|
dedupe: Invalid cross-device link
|
|
Try unaligned dedupe
|
|
dedupe: Invalid argument
|
|
Try overlapping dedupe
|
|
dedupe: Invalid argument
|
|
Try dedupe from past EOF
|
|
dedupe: Invalid argument
|
|
Try dedupe to past EOF, destination offset beyond EOF
|
|
dedupe: Invalid argument
|
|
Try dedupe to past EOF, destination offset behind EOF
|
|
dedupe: Invalid argument
|
|
Try to dedupe a dir
|
|
XFS_IOC_FILE_EXTENT_SAME: Is a directory
|
|
Try to dedupe a device
|
|
XFS_IOC_FILE_EXTENT_SAME: Invalid argument
|
|
Try to dedupe to a dir
|
|
TEST_DIR/test-158/dir1: Is a directory
|
|
Try to dedupe to a device
|
|
dedupe: Invalid argument
|
|
Try to dedupe to a fifo
|
|
dedupe: Invalid argument
|
|
Try to dedupe an append-only file
|
|
Dedupe two files
|