diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-03-06 15:26:24 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-06-05 20:52:58 -0400 |
commit | 1a36603bd2fbe2556eb90a7d21165d73acc351c7 (patch) | |
tree | 058af42583e9fb2ded7c3a8d166f223760951482 | |
parent | aa09f6a8c3c0e000f62925b61e90f4f0828dc8af (diff) |
bcachefs: fix missing bch_crc_bytes entries
-rw-r--r-- | fs/bcachefs/bcachefs_format.h | 10 | ||||
-rw-r--r-- | fs/bcachefs/checksum.h | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h index ab8b944634e8..dffb758ad834 100644 --- a/fs/bcachefs/bcachefs_format.h +++ b/fs/bcachefs/bcachefs_format.h @@ -426,6 +426,16 @@ enum bch_csum_type { BCH_CSUM_NR = 7, }; +static const unsigned bch_crc_bytes[] = { + [BCH_CSUM_NONE] = 0, + [BCH_CSUM_CRC32C_NONZERO] = 4, + [BCH_CSUM_CRC32C] = 4, + [BCH_CSUM_CRC64_NONZERO] = 8, + [BCH_CSUM_CRC64] = 8, + [BCH_CSUM_CHACHA20_POLY1305_80] = 10, + [BCH_CSUM_CHACHA20_POLY1305_128] = 16, +}; + static inline _Bool bch2_csum_type_is_encryption(enum bch_csum_type type) { switch (type) { diff --git a/fs/bcachefs/checksum.h b/fs/bcachefs/checksum.h index 2690cc4baeea..031b36f3f36e 100644 --- a/fs/bcachefs/checksum.h +++ b/fs/bcachefs/checksum.h @@ -109,14 +109,6 @@ static inline bool bch2_checksum_type_valid(const struct bch_fs *c, return true; } -static const unsigned bch_crc_bytes[] = { - [BCH_CSUM_NONE] = 0, - [BCH_CSUM_CRC32C] = 4, - [BCH_CSUM_CRC64] = 8, - [BCH_CSUM_CHACHA20_POLY1305_80] = 10, - [BCH_CSUM_CHACHA20_POLY1305_128] = 16, -}; - /* returns true if not equal */ static inline bool bch2_crc_cmp(struct bch_csum l, struct bch_csum r) { |