diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-29 14:22:29 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-07 14:29:32 -0400 |
commit | 39cdbd0940f46a56032c7417f2f93072fec524f6 (patch) | |
tree | 38c015adc1cc300c9cb3bf8f8faeb77c6cc3121b /fs/bcachefs/error.c | |
parent | 52b17bca7b20663e5df6dbfc24cc2030259b64b6 (diff) |
bcachefs: Change btree_insert_node() assertion to errorbcachefs-for-v6.14
Debug for https://github.com/koverstreet/bcachefs/issues/843
Print useful debug info and go emergency read-only.
(cherry picked from commit 63c3b8f616cc95bb1fcc6101c92485d41c535d7c)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/error.c')
-rw-r--r-- | fs/bcachefs/error.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c index 038da6a61f6b..6cbf4819e923 100644 --- a/fs/bcachefs/error.c +++ b/fs/bcachefs/error.c @@ -11,6 +11,14 @@ #define FSCK_ERR_RATELIMIT_NR 10 +void bch2_log_msg_start(struct bch_fs *c, struct printbuf *out) +{ +#ifdef BCACHEFS_LOG_PREFIX + prt_printf(out, bch2_log_msg(c, "")); +#endif + printbuf_indent_add(out, 2); +} + bool bch2_inconsistent_error(struct bch_fs *c) { set_bit(BCH_FS_error, &c->flags); |