summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-02-19 05:15:53 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:24 -0400
commit8ccf4dff09e49b34c6ed2e161720634e8dafb99f (patch)
tree71419d5619829aff695cf4ba78285d75e032f019 /fs/bcachefs/recovery.c
parent06a98c966f9ae5d978b53986eca2a9cd99d2a6f3 (diff)
downloadlwn-8ccf4dff09e49b34c6ed2e161720634e8dafb99f.tar.gz
lwn-8ccf4dff09e49b34c6ed2e161720634e8dafb99f.zip
bcachefs: opts.read_journal_only
Add an option that tells recovery to only read the journal, to be used by the list_journal command. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 3fef06faf32f..7def5938e24d 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -1072,6 +1072,9 @@ 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);