summaryrefslogtreecommitdiff
path: root/cmd_option.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-05-30 22:36:00 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-05-30 23:24:10 -0400
commit46b2c553aa462cf2c25b1fe017c164c2da471a98 (patch)
treee8e375ff2dd066764c76cf70af15f5834631fa6b /cmd_option.c
parent962390c0b2e90c1c85abfe69b8b76fd7ef3925ee (diff)
Update bcachefs sources to fad6d13aa5 fixup! bcachefs: Add persistent counters
Diffstat (limited to 'cmd_option.c')
-rw-r--r--cmd_option.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/cmd_option.c b/cmd_option.c
index b5f6326..86768e5 100644
--- a/cmd_option.c
+++ b/cmd_option.c
@@ -88,17 +88,19 @@ int cmd_set_option(int argc, char *argv[])
bch2_fs_stop(c);
return ret;
online:
- unsigned dev_idx;
- struct bchfs_handle fs = bchu_fs_open_by_dev(argv[i], &dev_idx);
+ {
+ unsigned dev_idx;
+ struct bchfs_handle fs = bchu_fs_open_by_dev(argv[i], &dev_idx);
- for (i = 0; i < bch2_opts_nr; i++) {
- if (!new_opt_strs.by_id[i])
- continue;
+ for (i = 0; i < bch2_opts_nr; i++) {
+ if (!new_opt_strs.by_id[i])
+ continue;
- char *path = mprintf("options/%s", bch2_opt_table[i].attr.name);
+ char *path = mprintf("options/%s", bch2_opt_table[i].attr.name);
- write_file_str(fs.sysfs_fd, path, new_opt_strs.by_id[i]);
- free(path);
+ write_file_str(fs.sysfs_fd, path, new_opt_strs.by_id[i]);
+ free(path);
+ }
}
return 0;
}