Commit 738540f7 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: kill bch2_crc64_update

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent d74dfe02
......@@ -62,7 +62,7 @@ static u64 bch2_checksum_update(unsigned type, u64 crc, const void *data, size_t
return crc32c(crc, data, len);
case BCH_CSUM_CRC64_NONZERO:
case BCH_CSUM_CRC64:
return bch2_crc64_update(crc, data, len);
return crc64_be(crc, data, len);
default:
BUG();
}
......
......@@ -25,11 +25,6 @@ static inline bool bch2_checksum_mergeable(unsigned type)
struct bch_csum bch2_checksum_merge(unsigned, struct bch_csum,
struct bch_csum, size_t);
static inline u64 bch2_crc64_update(u64 crc, const void *p, size_t len)
{
return crc64_be(crc, p, len);
}
#define BCH_NONCE_EXTENT cpu_to_le32(1 << 28)
#define BCH_NONCE_BTREE cpu_to_le32(2 << 28)
#define BCH_NONCE_JOURNAL cpu_to_le32(3 << 28)
......
......@@ -71,7 +71,7 @@ static inline void bch2_str_hash_init(struct bch_str_hash_ctx *ctx,
ctx->crc32c = crc32c(~0, &info->crc_key, sizeof(info->crc_key));
break;
case BCH_STR_HASH_CRC64:
ctx->crc64 = bch2_crc64_update(~0, &info->crc_key, sizeof(info->crc_key));
ctx->crc64 = crc64_be(~0, &info->crc_key, sizeof(info->crc_key));
break;
case BCH_STR_HASH_SIPHASH:
SipHash24_Init(&ctx->siphash, &info->siphash_key);
......@@ -90,7 +90,7 @@ static inline void bch2_str_hash_update(struct bch_str_hash_ctx *ctx,
ctx->crc32c = crc32c(ctx->crc32c, data, len);
break;
case BCH_STR_HASH_CRC64:
ctx->crc64 = bch2_crc64_update(ctx->crc64, data, len);
ctx->crc64 = crc64_be(ctx->crc64, data, len);
break;
case BCH_STR_HASH_SIPHASH:
SipHash24_Update(&ctx->siphash, data, len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment