bcachefs: Don't read journal just for fsck
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 31 Mar 2024 02:42:29 +0000 (22:42 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 8 May 2024 21:29:18 +0000 (17:29 -0400)
reading the journal can take a decent amount of time compared to the
rest of fsck, let's only read it when required.

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

index 08c0422a722dc32fde7129d1fc5fd8d45f13c6d7..9cf262f1a3cd18980e05fb4e325f8dd36b721b99 100644 (file)
@@ -658,7 +658,7 @@ int bch2_fs_recovery(struct bch_fs *c)
                goto err;
        }
 
-       if (!c->sb.clean || c->opts.fsck || c->opts.retain_recovery_info) {
+       if (!c->sb.clean || c->opts.retain_recovery_info) {
                struct genradix_iter iter;
                struct journal_replay **i;