summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-12-14 10:39:04 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:48 -0400
commit5bbe3f2d0e1e52c03f32cb40cc749e1ace6453d0 (patch)
tree561949ed10a4c50bf1727f0f8b294ae56f22f688 /fs/bcachefs/journal_types.h
parent9d7f2a4111be34eac6b23ed62271efb12f36815f (diff)
bcachefs: Log more messages in the journal
This patch - Adds a mechanism for queuing up journal entries prior to the journal being started, which will be used for early journal log messages - Adds bch2_fs_log_msg() and improves bch2_trans_log_msg(), which now take format strings. bch2_fs_log_msg() can be used before or after the journal has been started, and will use the appropriate mechanism. - Deletes the now obsolete bch2_journal_log_msg() - And adds more log messages to the recovery path - messages for journal/filesystem started, journal entries being blacklisted, and journal replay starting/finishing. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_types.h')
-rw-r--r--fs/bcachefs/journal_types.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/bcachefs/journal_types.h b/fs/bcachefs/journal_types.h
index 4c3065dceeea..0e6bde669b3e 100644
--- a/fs/bcachefs/journal_types.h
+++ b/fs/bcachefs/journal_types.h
@@ -177,6 +177,8 @@ enum journal_errors {
#undef x
};
+typedef DARRAY(u64) darray_u64;
+
/* Embedded in struct bch_fs */
struct journal {
/* Fastpath stuff up front: */
@@ -207,6 +209,12 @@ struct journal {
unsigned buf_size_want;
/*
+ * We may queue up some things to be journalled (log messages) before
+ * the journal has actually started - stash them here:
+ */
+ darray_u64 early_journal_entries;
+
+ /*
* Two journal entries -- one is currently open for new entries, the
* other is possibly being written out.
*/