bcachefs: Enumerate fsck errors
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 25 Oct 2023 00:44:36 +0000 (20:44 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 2 Nov 2023 01:11:08 +0000 (21:11 -0400)
commitb65db750e2bb9252321fd54c284edd73c1595a09
tree4974f89c5f7307357a7aa1e0f6969aba1e1a653c
parentf5d26fa31ed2e260589f0bc8af010bb742f1231e
bcachefs: Enumerate fsck errors

This patch adds a superblock error counter for every distinct fsck
error; this means that when analyzing filesystems out in the wild we'll
be able to see what sorts of inconsistencies are being found and repair,
and hence what bugs to look for.

Errors validating bkeys are not yet considered distinct fsck errors, but
this patch adds a new helper, bkey_fsck_err(), in order to add distinct
error types for them as well.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
37 files changed:
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.h
fs/bcachefs/backpointers.c
fs/bcachefs/backpointers.h
fs/bcachefs/bkey_methods.c
fs/bcachefs/bkey_methods.h
fs/bcachefs/btree_gc.c
fs/bcachefs/btree_io.c
fs/bcachefs/btree_update_interior.c
fs/bcachefs/buckets.c
fs/bcachefs/dirent.c
fs/bcachefs/dirent.h
fs/bcachefs/ec.c
fs/bcachefs/ec.h
fs/bcachefs/error.c
fs/bcachefs/error.h
fs/bcachefs/extents.c
fs/bcachefs/extents.h
fs/bcachefs/fsck.c
fs/bcachefs/inode.c
fs/bcachefs/inode.h
fs/bcachefs/journal_io.c
fs/bcachefs/lru.c
fs/bcachefs/lru.h
fs/bcachefs/quota.c
fs/bcachefs/quota.h
fs/bcachefs/recovery.c
fs/bcachefs/reflink.c
fs/bcachefs/reflink.h
fs/bcachefs/sb-clean.c
fs/bcachefs/sb-errors.h
fs/bcachefs/snapshot.c
fs/bcachefs/snapshot.h
fs/bcachefs/subvolume.c
fs/bcachefs/subvolume.h
fs/bcachefs/xattr.c
fs/bcachefs/xattr.h