diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-05-12 22:23:30 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:22 -0400 |
commit | 6009b4e5086783619172900e4090781491664517 (patch) | |
tree | a98a4a93d14e5b49dfc6aeff5d2ade498b044410 /fs/bcachefs/checksum.c | |
parent | 60755344c6b18753c93b353f147c2e23b8b18de1 (diff) | |
download | linux-6009b4e5086783619172900e4090781491664517.tar.gz linux-6009b4e5086783619172900e4090781491664517.tar.bz2 linux-6009b4e5086783619172900e4090781491664517.zip |
bcachefs: Merge extents with checksums
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/checksum.c')
-rw-r--r-- | fs/bcachefs/checksum.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/bcachefs/checksum.c b/fs/bcachefs/checksum.c index 98dc39de1e73..664e1bc2b139 100644 --- a/fs/bcachefs/checksum.c +++ b/fs/bcachefs/checksum.c @@ -281,22 +281,8 @@ void bch2_encrypt_bio(struct bch_fs *c, unsigned type, do_encrypt_sg(c->chacha20, nonce, sgl, bytes); } -static inline bool bch2_checksum_mergeable(unsigned type) -{ - - switch (type) { - case BCH_CSUM_NONE: - case BCH_CSUM_CRC32C: - case BCH_CSUM_CRC64: - return true; - default: - return false; - } -} - -static struct bch_csum bch2_checksum_merge(unsigned type, - struct bch_csum a, - struct bch_csum b, size_t b_len) +struct bch_csum bch2_checksum_merge(unsigned type, struct bch_csum a, + struct bch_csum b, size_t b_len) { BUG_ON(!bch2_checksum_mergeable(type)); |