This tweaks the recovery and journal paths so that we don't error out
before we need to: the list_journal command should work, even if we
wouldn't be able to replay successfully.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
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",
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;
}
}
- /*
- * 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;