summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/opts.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-07-12 22:27:16 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:07 -0400
commit986e9842fb6825f65918ed400b29c8c878359b7a (patch)
tree6a20a085db8f8c557879461c2154ee8f1790f4a3 /fs/bcachefs/opts.h
parente86e9124ca6c762f02cc412ce71feb9ed2e4890d (diff)
downloadlinux-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/opts.h')
-rw-r--r--fs/bcachefs/opts.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h
index 92e2e5e759d9..8a9db110d64f 100644
--- a/fs/bcachefs/opts.h
+++ b/fs/bcachefs/opts.h
@@ -174,12 +174,12 @@ enum fsck_err_opts {
NULL, NULL) \
x(compression, u8, \
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT|OPT_RUNTIME, \
- OPT_STR(bch2_compression_opts), \
+ OPT_FN(bch2_opt_compression), \
BCH_SB_COMPRESSION_TYPE, BCH_COMPRESSION_OPT_none, \
NULL, NULL) \
x(background_compression, u8, \
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT|OPT_RUNTIME, \
- OPT_STR(bch2_compression_opts), \
+ OPT_FN(bch2_opt_compression), \
BCH_SB_BACKGROUND_COMPRESSION_TYPE,BCH_COMPRESSION_OPT_none, \
NULL, NULL) \
x(str_hash, u8, \