summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/error.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-09-26 00:18:48 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:09:41 +0200
commitdbb9936b0dc905657db6e5289be18e425f1b60d3 (patch)
tree62b0e09a54fe6e52323bddbf455dc034ae6b8caa /fs/bcachefs/error.h
parentbcachefs: bch2_print_string_as_lines() (diff)
downloadlinux-dbb9936b0dc905657db6e5289be18e425f1b60d3.tar.xz
linux-dbb9936b0dc905657db6e5289be18e425f1b60d3.zip
bcachefs: Improve bch2_fsck_err()
- factor out fsck_err_get() - if the "bcachefs (%s):" prefix has already been applied, don't duplicate it - convert to printbufs instead of static char arrays - tidy up control flow a bit - use bch2_print_string_as_lines(), to avoid messages getting truncated Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/error.h')
-rw-r--r--fs/bcachefs/error.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/error.h b/fs/bcachefs/error.h
index b603d738c549..bbf9b6d85b4d 100644
--- a/fs/bcachefs/error.h
+++ b/fs/bcachefs/error.h
@@ -103,7 +103,7 @@ struct fsck_err_state {
const char *fmt;
u64 nr;
bool ratelimited;
- char buf[512];
+ struct printbuf buf;
};
#define FSCK_CAN_FIX (1 << 0)
@@ -121,7 +121,6 @@ void bch2_flush_fsck_errs(struct bch_fs *);
\
if (_ret != -BCH_ERR_fsck_fix && \
_ret != -BCH_ERR_fsck_ignore) { \
- bch_err(c, "Unable to continue, halting"); \
ret = _ret; \
goto fsck_err; \
} \