btrfs-progs/check
Qu Wenruo 08a3bd7694 btrfs-progs: tune: add the ability to generate new data checksums
This patch would modify btrfs_csum_file_block() to handle csum type
other than the one used in the current fs.

The new data checksum would use a different objectid (-13) to
distinguish with the existing one (-10).
This needs to change tree-checker to skip the item size checks,
since new csum can be larger than the original csum.

After this stage, the resulted csum tree would look like this:

	item 0 key (CSUM_CHANGE EXTENT_CSUM 13631488) itemoff 8091 itemsize 8192
		range start 13631488 end 22020096 length 8388608
	item 1 key (EXTENT_CSUM EXTENT_CSUM 13631488) itemoff 7067 itemsize 1024
		range start 13631488 end 14680064 length 1048576

Note the itemsize is 8 times the original one, as the original csum is
CRC32, while target csum is SHA256, which is 8 times the size.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 18:02:32 +02:00
..
clear-cache.c btrfs-progs: remove root argument from free_extent and inc_extent_ref 2023-05-26 18:02:30 +02:00
clear-cache.h btrfs-progs: tune: add --convert-to-free-space-tree option 2023-05-26 18:02:27 +02:00
common.h btrfs-progs: sync extent-io-tree.[ch] and misc.h from the kernel 2023-05-26 18:02:29 +02:00
main.c btrfs-progs: sync tree-checker.[ch] from kernel 2023-05-26 18:02:30 +02:00
mode-common.c btrfs-progs: tune: add the ability to generate new data checksums 2023-05-26 18:02:32 +02:00
mode-common.h btrfs-progs: check: move global variables to common headers 2022-10-11 09:08:09 +02:00
mode-lowmem.c btrfs-progs: sync tree-checker.[ch] from kernel 2023-05-26 18:02:30 +02:00
mode-lowmem.h btrfs-progs: check: update include lists 2022-10-11 09:06:12 +02:00
mode-original.h
qgroup-verify.c btrfs-progs: update read_tree_block to match the kernel definition 2023-05-26 18:02:30 +02:00
qgroup-verify.h btrfs-progs: check: update include lists 2022-10-11 09:06:12 +02:00
repair.c btrfs-progs: sync tree-checker.[ch] from kernel 2023-05-26 18:02:30 +02:00
repair.h btrfs-progs: add a btrfs check helper for checking blocks 2023-05-26 18:02:28 +02:00