Commit 8ccf4dff authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

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: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 06a98c96
......@@ -329,6 +329,11 @@ enum opt_type {
OPT_BOOL(), \
NO_SB_OPT, false, \
NULL, "Read all journal entries, not just dirty ones")\
x(read_journal_only, u8, \
0, \
OPT_BOOL(), \
NO_SB_OPT, false, \
NULL, "Only read the journal, skip the rest of recovery")\
x(journal_transaction_names, u8, \
OPT_FS|OPT_FORMAT|OPT_MOUNT|OPT_RUNTIME, \
OPT_BOOL(), \
......
......@@ -1072,6 +1072,9 @@ int bch2_fs_recovery(struct bch_fs *c)
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);
......
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