bcachefs: Improve bch2_fsck_err()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 25 Sep 2022 22:18:48 +0000 (18:18 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:41 +0000 (17:09 -0400)
commitdbb9936b0dc905657db6e5289be18e425f1b60d3
tree62b0e09a54fe6e52323bddbf455dc034ae6b8caa
parenta8f35428430446d8c9e871b36ab2b49c0a9daec7
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>
fs/bcachefs/bcachefs.h
fs/bcachefs/error.c
fs/bcachefs/error.h