Commit 0095aa94 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Improve some fsck error messages

We have string names for d_type; use it.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent b33bf1bc
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment