summaryrefslogtreecommitdiff
path: root/fs/bcachefs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-06-06 23:04:33 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:33 -0400
commitf2aa02657561b0e6d96089eb8ee44e4154f4acad (patch)
tree13a4b285bd4d804722fede86529d026ba205c0f1 /fs/bcachefs
parentcb685ce72cc7e91733d3197346bbfe61e8ad54eb (diff)
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: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r--fs/bcachefs/recovery.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index edb04f65a148..5fe7595d36be 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -1175,9 +1175,6 @@ use_clean:
blacklist_seq = journal_seq = le64_to_cpu(clean->journal_seq) + 1;
}
- if (c->opts.read_journal_only)
- goto out;
-
if (c->opts.reconstruct_alloc) {
c->sb.compat &= ~(1ULL << BCH_COMPAT_alloc_info);
drop_alloc_keys(&c->journal_keys);
@@ -1208,6 +1205,13 @@ 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;