summaryrefslogtreecommitdiff
path: root/fs/bcachefs/error.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-09-26 01:18:48 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:41 +0300
commitdbb9936b0dc905657db6e5289be18e425f1b60d3 (patch)
tree62b0e09a54fe6e52323bddbf455dc034ae6b8caa /fs/bcachefs/error.h
parenta8f35428430446d8c9e871b36ab2b49c0a9daec7 (diff)
downloadlinux-dbb9936b0dc905657db6e5289be18e425f1b60d3.tar.xz
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; \
} \