Message ID | cf0d71c9744a1841278fc08b0c294d4b1292cb8f.1564046972.git.jthumshirn@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Support xxhash64 checksums | expand |
On Thu, Jul 25, 2019 at 11:33:54AM +0200, Johannes Thumshirn wrote: > 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> Added to devel.
diff --git a/disk-io.c b/disk-io.c index be44eead5cef..01314504a50a 100644 --- a/disk-io.c +++ b/disk-io.c @@ -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) {
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> --- disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)