]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bcachefs: Journal keys are retained until shutdown, or journal replay finishes
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 30 May 2025 00:06:01 +0000 (20:06 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 1 Jun 2025 02:03:17 +0000 (22:03 -0400)
If we don't finish journal replay we need to keep journal keys around
until the filesystem shuts down - otherwise e.g. -o norecovery, various
tools (dump, list) break, and eventually we'll be doing journal replay
in the background.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/recovery.c

index 4fca575755657482260f9bd53bfab065155143bb..4b51105bdb2e1512bbbaee4ef24f12ef5e3a7496 100644 (file)
@@ -1093,10 +1093,6 @@ use_clean:
 out:
        bch2_flush_fsck_errs(c);
 
-       if (!c->opts.retain_recovery_info) {
-               bch2_journal_keys_put_initial(c);
-               bch2_find_btree_nodes_exit(&c->found_btree_nodes);
-       }
        if (!IS_ERR(clean))
                kfree(clean);