bcachefs: kill bch2_crc64_update

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2019-07-03 19:36:39 -04:00 committed by Kent Overstreet
parent d74dfe0288
commit 738540f7fc
3 changed files with 3 additions and 8 deletions

View file

@ -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();
}

View file

@ -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)

View file

@ -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);