diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-13 00:50:58 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-16 03:45:40 -0400 |
commit | cce723fde2714f4267a6951f9030f1d15ba0b7fc (patch) | |
tree | 8b76c469b0a9151377c860ae315a1c755e46fb23 | |
parent | 821d66df4406ab1be7de8cc79e5ae0ffae265ff0 (diff) |
add a mount opt to kill alloc btree
-rw-r--r-- | fs/bcachefs/opts.h | 3 | ||||
-rw-r--r-- | fs/bcachefs/recovery.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h index f476033e707f..b692c82db638 100644 --- a/fs/bcachefs/opts.h +++ b/fs/bcachefs/opts.h @@ -175,6 +175,9 @@ enum opt_type { NO_SB_OPT, false) \ BCH_OPT(nostart, u8, OPT_INTERNAL, \ OPT_BOOL(), \ + NO_SB_OPT, false) \ + BCH_OPT(kill_alloc_btree, u8, OPT_MOUNT, \ + OPT_BOOL(), \ NO_SB_OPT, false) struct bch_opts { diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 58aee7aeef82..3a1023df43f3 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -180,6 +180,10 @@ int bch2_fs_recovery(struct bch_fs *c) unsigned level; struct bkey_i *k; + if (i == BTREE_ID_ALLOC && + c->opts.kill_alloc_btree) + continue; + k = btree_root_find(c, clean, j, i, &level); if (!k) continue; |