Commit f2aa0265 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix for cmd_list_journal

cmd_list_journal wasn't correctly listing the most recent journal
entries as blacklisted - because in the recovery path when just reading
the journal, we were failing to add those to the blacklist table.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent cb685ce7
...@@ -1175,9 +1175,6 @@ int bch2_fs_recovery(struct bch_fs *c) ...@@ -1175,9 +1175,6 @@ int bch2_fs_recovery(struct bch_fs *c)
blacklist_seq = journal_seq = le64_to_cpu(clean->journal_seq) + 1; blacklist_seq = journal_seq = le64_to_cpu(clean->journal_seq) + 1;
} }
if (c->opts.read_journal_only)
goto out;
if (c->opts.reconstruct_alloc) { if (c->opts.reconstruct_alloc) {
c->sb.compat &= ~(1ULL << BCH_COMPAT_alloc_info); c->sb.compat &= ~(1ULL << BCH_COMPAT_alloc_info);
drop_alloc_keys(&c->journal_keys); drop_alloc_keys(&c->journal_keys);
...@@ -1208,6 +1205,13 @@ int bch2_fs_recovery(struct bch_fs *c) ...@@ -1208,6 +1205,13 @@ int bch2_fs_recovery(struct bch_fs *c)
} }
} }
/*
* 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); ret = bch2_fs_journal_start(&c->journal, journal_seq);
if (ret) if (ret)
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment