btrfs-progs/convert
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
..
Makefile btrfs-progs: build: add stub makefile to convert 2017-03-08 13:00:46 +01:00
common.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
common.h btrfs-progs: convert: move simple_range into common.h 2022-10-11 09:08:08 +02:00
main.c btrfs-progs: tune: add the ability to generate new data checksums 2023-05-26 18:02:32 +02:00
source-ext2.c btrfs-progs: sync file-item.h into progs 2023-05-26 18:02:29 +02:00
source-ext2.h btrfs-progs: convert: update include lists 2022-10-11 09:06:12 +02:00
source-fs.c btrfs-progs: convert: do proper error handling 2022-10-11 09:08:10 +02:00
source-fs.h btrfs-progs: convert: expose intersect_with_reserved() to main.c 2022-10-11 09:08:08 +02:00
source-reiserfs.c btrfs-progs: replace write_and_map_eb() by write_data_to_disk() 2023-05-26 18:02:31 +02:00
source-reiserfs.h btrfs-progs: convert: update include lists 2022-10-11 09:06:12 +02:00