mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
91540ef980
Test that deduplication of an entire file that has a size that is not
aligned to the filesystem's block size into the middle of a different
file does not corrupt the destination's file data by reflinking the last
(eof) block.
This test is motivated by a bug recently found that affects both Btrfs
and XFS, and is fixed by the following commits/patches for the linux
kernel:
07d19dc9fbe9 ("vfs: avoid problematic remapping requests into partial EOF block")
dceeb47b0ed6 ("xfs: fix data corruption w/ unaligned dedupe ranges")
de02b9f6bb65 ("Btrfs: fix data corruption when deduplicating between different files")
Btrfs: fix infinite loop on inode eviction after deduplication of eof block
The VFS patch was added to kernel 4.20-rc1 and the XFS and first Btrfs
patches were added to kernel 4.19. The second patch for Btrfs is very
recent and it is not yet in Linus' tree.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
QA output created by 517
|
|
wrote 2518890/2518890 bytes at offset 0
|
|
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 102398/102398 bytes at offset 2518890
|
|
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 557771/557771 bytes at offset 0
|
|
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
File content before first deduplication:
|
|
0000000 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
|
|
*
|
|
11467540 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b ae ae ae ae ae ae
|
|
11467560 ae ae ae ae ae ae ae ae ae ae ae ae ae ae ae ae
|
|
*
|
|
11777540 ae ae ae ae ae ae ae ae
|
|
11777550
|
|
deduped 557771/557771 bytes at offset 1957888
|
|
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
File content after first deduplication and before unmounting:
|
|
0000000 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
|
|
*
|
|
2518880 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b ae ae ae ae ae ae
|
|
2518896 ae ae ae ae ae ae ae ae ae ae ae ae ae ae ae ae
|
|
*
|
|
2621280 ae ae ae ae ae ae ae ae
|
|
2621288
|
|
File content after first unmount:
|
|
0000000 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
|
|
*
|
|
2518880 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b ae ae ae ae ae ae
|
|
2518896 ae ae ae ae ae ae ae ae ae ae ae ae ae ae ae ae
|
|
*
|
|
2621280 ae ae ae ae ae ae ae ae
|
|
2621288
|
|
wrote 100/100 bytes at offset 0
|
|
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
deduped 100/100 bytes at offset 2519040
|
|
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
File content after second deduplication:
|
|
0000000 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
|
|
*
|
|
2518880 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b ae ae ae ae ae ae
|
|
2518896 ae ae ae ae ae ae ae ae ae ae ae ae ae ae ae ae
|
|
*
|
|
2621280 ae ae ae ae ae ae ae ae
|
|
2621288
|