btrfs-progs/tests/convert-tests
Qu Wenruo 3c35adb2f7 btrfs-progs: tests: add test case for ext4 unwritten extents
The test case verifies behavior of ext4 unwritten extents:

- Create a unwritten (preallocated) extent on ext4

- Fill the on-disk extent with random garbage
  This is to make sure if btrfs tries to read the on-disk data, it would
  definitely get some garbage.
  As I found sometimes mkfs.ext4 can fill the unused bg with zeros.

- Fill the preallocated file range with some data
  This is to make sure btrfs-convert can handle mixed written and
  unwritten ranges.

- Save the checksum of the file.

- Convert the fs

- Verify the checksum
  For older btrfs-convert, there would be only one regular file extent,
  and reading the file would read out some garbage and cause checksum to
  mismatch.

  For the fixed btrfs-convert, we punch holes for unwritten extents,
  thus only the written part would be read out and match the checksum.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-06-03 22:11:41 +02:00
..
001-ext2-basic btrfs-progs: convert: add raid-stripe-tree to allowed features 2024-01-31 09:49:43 +01:00
003-ext4-basic btrfs-progs: convert: add raid-stripe-tree to allowed features 2024-01-31 09:49:43 +01:00
004-ext2-backup-superblock-ranges btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
005-delete-all-rollback btrfs-progs: convert: add raid-stripe-tree to allowed features 2024-01-31 09:49:43 +01:00
006-large-hole-extent btrfs-progs: tests: check for btrfs ACL support 2023-07-26 14:59:10 +02:00
007-unsupported-block-sizes btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
008-readonly-image btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
009-common-inode-flags btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
010-reiserfs-basic btrfs-progs: convert: add raid-stripe-tree to allowed features 2024-01-31 09:49:43 +01:00
011-reiserfs-delete-all-rollback btrfs-progs: convert: add raid-stripe-tree to allowed features 2024-01-31 09:49:43 +01:00
012-reiserfs-large-hole-extent btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
013-reiserfs-common-inode-flags btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
014-reiserfs-tail-handling btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
015-no-rollback-after-balance btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
016-invalid-large-inline-extent btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
017-fs-near-full btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
018-fs-size-overflow btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
019-ext4-copy-timestamps btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
020-refuse-needs-recovery btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
021-uuid-fsid btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
022-reiserfs-parent-ref btrfs-progs: tests: fix 022-reiserfs-parent-ref setup 2024-01-17 03:21:19 +01:00
023-64k-blocksize-migrated btrfs-progs: tests: convert: add a test case to check the csum for the image file 2023-05-26 18:02:31 +02:00
024-ntfs-basic btrfs-progs: convert: add raid-stripe-tree to allowed features 2024-01-31 09:49:43 +01:00
025-ext4-uninit-written btrfs-progs: tests: add test case for ext4 unwritten extents 2024-06-03 22:11:41 +02:00