summaryrefslogtreecommitdiff
path: root/libbcachefs/sysfs.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/sysfs.c
parentbdba182d105b1eaa9776c78a094b0b0192046651 (diff)
Update bcachefs sources to a9f14c773f bcachefs: More btree gc refactorings
Diffstat (limited to 'libbcachefs/sysfs.c')
-rw-r--r--libbcachefs/sysfs.c16
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);