btrfs-progs/mkfs
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
..
common.c btrfs-progs: sync accessors.[ch] from the kernel 2023-05-26 18:02:28 +02:00
common.h btrfs-progs: fsfeatures: properly merge -O and -R options 2022-10-11 09:08:11 +02:00
main.c btrfs-progs: introduce UASSERT() for purely userspace code 2023-05-26 18:02:28 +02:00
Makefile btrfs-progs: build: add stub makefile to image and mkfs 2019-07-04 15:36:01 +02:00
rootdir.c btrfs-progs: tune: add the ability to generate new data checksums 2023-05-26 18:02:32 +02:00
rootdir.h btrfs-progs: mkfs: update include lists 2022-10-11 09:06:12 +02:00