summaryrefslogtreecommitdiff
path: root/libbcachefs/opts.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-11-12 19:20:40 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2018-11-12 19:22:36 -0500
commitcc6479303f0672d5e07899009c64eb32821e170b (patch)
tree2aacceb0e1d623226c03703837386612ed8f76e1 /libbcachefs/opts.c
parentbdba182d105b1eaa9776c78a094b0b0192046651 (diff)
Update bcachefs sources to a9f14c773f bcachefs: More btree gc refactorings
Diffstat (limited to 'libbcachefs/opts.c')
-rw-r--r--libbcachefs/opts.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libbcachefs/opts.c b/libbcachefs/opts.c
index 1dab991..775d6a6 100644
--- a/libbcachefs/opts.c
+++ b/libbcachefs/opts.c
@@ -2,6 +2,7 @@
#include <linux/kernel.h>
#include "bcachefs.h"
+#include "compress.h"
#include "disk_groups.h"
#include "opts.h"
#include "super-io.h"
@@ -268,6 +269,20 @@ void bch2_opt_to_text(struct printbuf *out, struct bch_fs *c,
}
}
+int bch2_opt_check_may_set(struct bch_fs *c, int id, u64 v)
+{
+ int ret = 0;
+
+ switch (id) {
+ case Opt_compression:
+ case Opt_background_compression:
+ ret = bch2_check_set_has_compressed_data(c, v);
+ break;
+ }
+
+ return ret;
+}
+
int bch2_parse_mount_opts(struct bch_opts *opts, char *options)
{
char *opt, *name, *val;