diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-12 22:27:16 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:07 -0400 |
commit | 986e9842fb6825f65918ed400b29c8c878359b7a (patch) | |
tree | 6a20a085db8f8c557879461c2154ee8f1790f4a3 /fs/bcachefs/checksum.h | |
parent | e86e9124ca6c762f02cc412ce71feb9ed2e4890d (diff) | |
download | linux-986e9842fb6825f65918ed400b29c8c878359b7a.tar.gz linux-986e9842fb6825f65918ed400b29c8c878359b7a.tar.bz2 linux-986e9842fb6825f65918ed400b29c8c878359b7a.zip |
bcachefs: Compression levels
This allows including a compression level when specifying a compression
type, e.g.
compression=zstd:15
Values from 1 through 15 indicate compression levels, 0 or unspecified
indicates the default.
For LZ4, values 3-15 specify that the HC algorithm should be used.
Note that for compatibility, extents themselves only include the
compression type, not the compression level. This means that specifying
the same compression algorithm but different compression levels for the
compression and background_compression options will have no effect.
XXX: perhaps we could add a warning for this
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, 0 insertions, 6 deletions
diff --git a/fs/bcachefs/checksum.h b/fs/bcachefs/checksum.h index 409ad534d9f4..1ad1d5f03939 100644 --- a/fs/bcachefs/checksum.h +++ b/fs/bcachefs/checksum.h @@ -120,12 +120,6 @@ static inline enum bch_csum_type bch2_meta_checksum_type(struct bch_fs *c) return bch2_csum_opt_to_type(c->opts.metadata_checksum, false); } -static const unsigned bch2_compression_opt_to_type[] = { -#define x(t, n) [BCH_COMPRESSION_OPT_##t] = BCH_COMPRESSION_TYPE_##t, - BCH_COMPRESSION_OPTS() -#undef x -}; - static inline bool bch2_checksum_type_valid(const struct bch_fs *c, unsigned type) { |