summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/bcachefs/journal_io.c3
-rw-r--r--fs/bcachefs/recovery.c14
2 files changed, 8 insertions, 9 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index d1deb0573ffd..cd48ba11e771 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -1187,8 +1187,7 @@ int bch2_journal_read(struct bch_fs *c, u64 *blacklist_seq, u64 *start_seq)
if (!last_seq) {
fsck_err(c, "journal read done, but no entries found after dropping non-flushes");
- ret = -1;
- goto err;
+ return 0;
}
bch_info(c, "journal read done, replaying entries %llu-%llu",
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 7c9f4a97bc03..aff813e3e360 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -1113,6 +1113,13 @@ int bch2_fs_recovery(struct bch_fs *c)
if (ret)
goto err;
+ /*
+ * note: cmd_list_journal needs the blacklist table fully up to date so
+ * it can asterisk ignored journal entries:
+ */
+ if (c->opts.read_journal_only)
+ goto out;
+
genradix_for_each_reverse(&c->journal_entries, iter, i)
if (*i && !(*i)->ignore) {
last_journal_entry = &(*i)->j;
@@ -1184,13 +1191,6 @@ use_clean:
}
}
- /*
- * note: cmd_list_journal needs the blacklist table fully up to date so
- * it can asterisk ignored journal entries:
- */
- if (c->opts.read_journal_only)
- goto out;
-
ret = bch2_fs_journal_start(&c->journal, journal_seq);
if (ret)
goto err;