summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-03-10 14:25:16 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:27 -0400
commitd5d3be7dc5d09f9cf8d12b3e3cefbcd8020cddae (patch)
tree825e7457732d027cd295247aa51301a587de49ea /fs/bcachefs/recovery.c
parenta9bae40fda067eae70751302cbbc9f362453f310 (diff)
downloadlwn-d5d3be7dc5d09f9cf8d12b3e3cefbcd8020cddae.tar.gz
lwn-d5d3be7dc5d09f9cf8d12b3e3cefbcd8020cddae.zip
bcachefs: bch2_journal_log_msg()
This adds bch2_journal_log_msg(), which just logs a message to the journal, and uses it to mark startup and when journal replay finishes. 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 6c4ffc5abdc5..887971559214 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -578,6 +578,9 @@ static int bch2_journal_replay(struct bch_fs *c)
bch2_journal_set_replay_done(j);
bch2_journal_flush_all_pins(j);
ret = bch2_journal_error(j);
+
+ if (keys->nr && !ret)
+ bch2_journal_log_msg(&c->journal, "journal replay finished");
err:
kvfree(keys_sorted);
return ret;