bcachefs: Improved superblock-related error messages
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 4 Jan 2022 04:38:50 +0000 (23:38 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:21 +0000 (17:09 -0400)
commitefe68e1d65c008dd1f19517378d0ad0688c6a643
tree05163aa98ac4e4ed0d2f057c7f48b3047a012921
parentfe312f81ef62f8aec0c21dabb703baeb4a7533fc
bcachefs: Improved superblock-related error messages

This patch converts bch2_sb_validate() and the .validate methods for the
various superblock sections to take printbuf, to which they can print
detailed error messages, including printing the entire section that was
invalid.

This is a great improvement over the previous situation, where we could
only return static strings that didn't have precise information about
what was wrong.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/disk_groups.c
fs/bcachefs/journal_seq_blacklist.c
fs/bcachefs/quota.c
fs/bcachefs/replicas.c
fs/bcachefs/super-io.c
fs/bcachefs/super-io.h
fs/bcachefs/super.c
fs/bcachefs/super.h