diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-01-11 05:11:07 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:14 -0400 |
commit | 04c2c34f00e1dacae2d329764b912e4a560efbb7 (patch) | |
tree | a1479febc3b28623ff222bf90ebe0efc19d0cdaa /fs/bcachefs/checksum.h | |
parent | 23f80d2b3bf7898579c841786c49842789f32ff5 (diff) |
bcachefs: use crc64 from lib/
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/checksum.h')
-rw-r--r-- | fs/bcachefs/checksum.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/bcachefs/checksum.h b/fs/bcachefs/checksum.h index 42c86466293e..e2f2d797f90c 100644 --- a/fs/bcachefs/checksum.h +++ b/fs/bcachefs/checksum.h @@ -6,9 +6,13 @@ #include "extents_types.h" #include "super-io.h" +#include <linux/crc64.h> #include <crypto/chacha.h> -u64 bch2_crc64_update(u64, const void *, 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) |