summaryrefslogtreecommitdiff
path: root/fs/bcachefs/opts.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-03-21 07:15:38 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:28 +0300
commit63c4b25453828ee0670162d35f928ab43635e7fc (patch)
treef7a5d03fa18c92421a64c8cf65f3e1d992dd4b93 /fs/bcachefs/opts.h
parent74b33393db54dd321c807c621fad966eb9ec54e5 (diff)
downloadlinux-63c4b25453828ee0670162d35f928ab43635e7fc.tar.xz
bcachefs: Better superblock opt validation
This moves validation of superblock options to bch2_sb_validate(), so they'll be checked in the write path as well. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/opts.h')
-rw-r--r--fs/bcachefs/opts.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h
index eeab4bb22597..69ca75429943 100644
--- a/fs/bcachefs/opts.h
+++ b/fs/bcachefs/opts.h
@@ -489,8 +489,9 @@ void __bch2_opt_set_sb(struct bch_sb *, const struct bch_option *, u64);
void bch2_opt_set_sb(struct bch_fs *, const struct bch_option *, u64);
int bch2_opt_lookup(const char *);
-int bch2_opt_parse(struct bch_fs *, const char *, const struct bch_option *,
- const char *, u64 *);
+int bch2_opt_validate(const struct bch_option *, u64, struct printbuf *);
+int bch2_opt_parse(struct bch_fs *, const struct bch_option *,
+ const char *, u64 *, struct printbuf *);
#define OPT_SHOW_FULL_LIST (1 << 0)
#define OPT_SHOW_MOUNT_STYLE (1 << 1)