diff options
-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; |