diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 18:29:54 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-31 12:18:37 -0400 |
commit | 6ddedca2180b095aacca0f628e0d03a32477f68f (patch) | |
tree | 5803ddaeb0620d622de35d9915308c774a8de4cb /fs/bcachefs/opts.h | |
parent | ef435abd6a99206d9bb93462a1b0508e0d876adb (diff) | |
download | linux-6ddedca2180b095aacca0f628e0d03a32477f68f.tar.gz linux-6ddedca2180b095aacca0f628e0d03a32477f68f.tar.bz2 linux-6ddedca2180b095aacca0f628e0d03a32477f68f.zip |
bcachefs: Guard against unknown compression options
Since compression options now include compression level, proper
validation is a bit more involved.
This adds bch2_compression_opt_valid(), and plumbs it around
appropriately.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.h')
-rw-r--r-- | fs/bcachefs/opts.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h index 16dd0f0622bc..2307cdd2a23c 100644 --- a/fs/bcachefs/opts.h +++ b/fs/bcachefs/opts.h @@ -74,6 +74,7 @@ enum opt_type { struct bch_opt_fn { int (*parse)(struct bch_fs *, const char *, u64 *, struct printbuf *); void (*to_text)(struct printbuf *, struct bch_fs *, struct bch_sb *, u64); + int (*validate)(u64, struct printbuf *); }; /** |