btrfs-progs: use btrfs_csum_data() in __csum_tree_block_size()
Use the btrfs_csum_data() wrapper in __csum_tree_block_size() instead of directly calling crc32c(). This helps us when plumbing new checksum algorithms into the FS. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
55a8c9626f
commit
5eb0c11333
|
@ -156,7 +156,7 @@ static int __csum_tree_block_size(struct extent_buffer *buf, u16 csum_size,
|
|||
u32 crc = ~(u32)0;
|
||||
|
||||
len = buf->len - BTRFS_CSUM_SIZE;
|
||||
crc = crc32c(crc, buf->data + BTRFS_CSUM_SIZE, len);
|
||||
crc = btrfs_csum_data(buf->data + BTRFS_CSUM_SIZE, crc, len);
|
||||
btrfs_csum_final(crc, result);
|
||||
|
||||
if (verify) {
|
||||
|
|
Loading…
Reference in a new issue