summaryrefslogtreecommitdiff
path: root/libbcachefs/checksum.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/checksum.h')
-rw-r--r--libbcachefs/checksum.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbcachefs/checksum.h b/libbcachefs/checksum.h
index 031b36f3..fb72c6a4 100644
--- a/libbcachefs/checksum.h
+++ b/libbcachefs/checksum.h
@@ -5,9 +5,13 @@
#include "extents_types.h"
#include "super-io.h"
+#include <linux/crc64.h>
#include <crypto/chacha20.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)