summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-04-16 18:59:58 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:31 -0400
commit0095aa94bca372b411d616a1aa1101ffa38ad09d (patch)
tree368c3d076bbb31f47b2945a850171d1f7ac1735c
parentb33bf1bc0d1e81d614aad0f73f46f10e02906d20 (diff)
downloadlwn-0095aa94bca372b411d616a1aa1101ffa38ad09d.tar.gz
lwn-0095aa94bca372b411d616a1aa1101ffa38ad09d.zip
bcachefs: Improve some fsck error messages
We have string names for d_type; use it. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r--fs/bcachefs/fsck.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index cf9e6f595d53..d507b9fdd32e 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -1405,8 +1405,8 @@ static int check_dirent_target(struct btree_trans *trans,
if (fsck_err_on(backpointer_exists &&
!target->bi_nlink, c,
- "inode %llu has multiple links but i_nlink 0",
- target->bi_inum)) {
+ "inode %llu type %s has multiple links but i_nlink 0",
+ target->bi_inum, bch2_d_types[d.v->d_type])) {
target->bi_nlink++;
target->bi_flags &= ~BCH_INODE_UNLINKED;
@@ -2254,8 +2254,8 @@ static int check_nlinks_update_hardlinks(struct bch_fs *c,
}
if (fsck_err_on(bch2_inode_nlink_get(&u) != link->count, c,
- "inode %llu has wrong i_nlink (type %u i_nlink %u, should be %u)",
- u.bi_inum, mode_to_type(u.bi_mode),
+ "inode %llu type %s has wrong i_nlink (%u, should be %u)",
+ u.bi_inum, bch2_d_types[mode_to_type(u.bi_mode)],
bch2_inode_nlink_get(&u), link->count)) {
bch2_inode_nlink_set(&u, link->count);