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@gmail.com>2022-05-30 18:17:06 -0400
commit969514a3e354c0a62e1b9bca0a86f9671edb2300 (patch)
tree1e0bf9b50e8b7a0a026fc3bb107d0095ac3be14a /fs/bcachefs/recovery.c
parent4832156726c471f00bf2523dc80fa74bc715646b (diff)
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 d7b96d287ce3..96f13f2e7a9a 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -1054,6 +1054,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);