diff options
Diffstat (limited to 'libbcachefs/sysfs.c')
-rw-r--r-- | libbcachefs/sysfs.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/libbcachefs/sysfs.c b/libbcachefs/sysfs.c index c6a653ac..f793cfba 100644 --- a/libbcachefs/sysfs.c +++ b/libbcachefs/sysfs.c @@ -9,7 +9,6 @@ #include "bcachefs.h" #include "alloc_background.h" -#include "compress.h" #include "sysfs.h" #include "btree_cache.h" #include "btree_io.h" @@ -346,8 +345,8 @@ SHOW(bch2_fs) sysfs_print(promote_whole_extents, c->promote_whole_extents); - sysfs_printf(meta_replicas_have, "%u", bch2_replicas_online(c, true)); - sysfs_printf(data_replicas_have, "%u", bch2_replicas_online(c, false)); + sysfs_printf(meta_replicas_have, "%i", bch2_replicas_online(c, true)); + sysfs_printf(data_replicas_have, "%i", bch2_replicas_online(c, false)); /* Debugging: */ @@ -580,14 +579,9 @@ STORE(bch2_fs_opts_dir) if (ret < 0) return ret; - if (id == Opt_compression || - id == Opt_background_compression) { - int ret = bch2_check_set_has_compressed_data(c, v); - if (ret) { - mutex_unlock(&c->sb_lock); - return ret; - } - } + ret = bch2_opt_check_may_set(c, id, v); + if (ret < 0) + return ret; if (opt->set_sb != SET_NO_SB_OPT) { mutex_lock(&c->sb_lock); |