diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-06 20:34:16 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-06 20:34:20 -0400 |
commit | da1d5571f5ca526100797b47f9496cf2dcd03e38 (patch) | |
tree | 5b5bd71e1b57dd4886949f4de9b1942ed78ae1bf | |
parent | 6958dd8df2a86b33fa973aba08b4f76085af3c36 (diff) |
fixup! cmd_set_option: Can now set device options
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | c_src/cmd_option.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/c_src/cmd_option.c b/c_src/cmd_option.c index 866dfeb2..0dcbe312 100644 --- a/c_src/cmd_option.c +++ b/c_src/cmd_option.c @@ -88,8 +88,6 @@ int cmd_set_option(int argc, char *argv[]) exit(EXIT_FAILURE); } - mutex_lock(&c->sb_lock); - for (i = 0; i < bch2_opts_nr; i++) { const struct bch_option *opt = bch2_opt_table + i; @@ -108,7 +106,7 @@ int cmd_set_option(int argc, char *argv[]) fprintf(stderr, "Can't set option %s\n", opt->attr.name); if (opt->flags & OPT_FS) { - __bch2_opt_set_sb(c->disk_sb.sb, -1, opt, v); + bch2_opt_set_sb(c, NULL, opt, v); } if (opt->flags & OPT_DEVICE) { @@ -119,14 +117,11 @@ int cmd_set_option(int argc, char *argv[]) continue; } - __bch2_opt_set_sb(c->disk_sb.sb, dev_idx, opt, v); + bch2_opt_set_sb(c, c->devs[dev_idx], opt, v); } } } - bch2_write_super(c); - mutex_unlock(&c->sb_lock); - bch2_fs_stop(c); return ret; } else { |