diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-01-22 03:51:42 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:08:52 +0200 |
commit | 079663d8ed81bfd74a331b819eda17d753719605 (patch) | |
tree | 5757439f4d3d4fb1090236d8e729ee7b9587da83 /fs/bcachefs/recovery.c | |
parent | bcachefs: Ensure __bch2_trans_commit() always calls bch2_trans_reset() (diff) | |
download | linux-079663d8ed81bfd74a331b819eda17d753719605.tar.xz linux-079663d8ed81bfd74a331b819eda17d753719605.zip |
bcachefs: Kill metadata only gc
This was useful before we had transactional updates to interior btree
nodes - but now, it's just extra unneeded complexity.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/recovery.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 8c67f1468945..422f2fbe6dfb 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -1099,27 +1099,13 @@ use_clean: set_bit(BCH_FS_ALLOC_READ_DONE, &c->flags); - if ((c->sb.compat & (1ULL << BCH_COMPAT_FEAT_ALLOC_INFO)) && - !(c->sb.compat & (1ULL << BCH_COMPAT_FEAT_ALLOC_METADATA))) { - /* - * interior btree node updates aren't consistent with the - * journal; after an unclean shutdown we have to walk all - * pointers to metadata: - */ - bch_info(c, "starting metadata mark and sweep"); - err = "error in mark and sweep"; - ret = bch2_gc(c, &c->journal_keys, true, true); - if (ret) - goto err; - bch_verbose(c, "mark and sweep done"); - } - if (c->opts.fsck || !(c->sb.compat & (1ULL << BCH_COMPAT_FEAT_ALLOC_INFO)) || + !(c->sb.compat & (1ULL << BCH_COMPAT_FEAT_ALLOC_METADATA)) || test_bit(BCH_FS_REBUILD_REPLICAS, &c->flags)) { bch_info(c, "starting mark and sweep"); err = "error in mark and sweep"; - ret = bch2_gc(c, &c->journal_keys, true, false); + ret = bch2_gc(c, &c->journal_keys, true); if (ret) goto err; bch_verbose(c, "mark and sweep done"); |