Loading fs/bcachefs/fsck.c +16 −8 Original line number Diff line number Diff line Loading @@ -2066,16 +2066,24 @@ static int check_subdir_count_notnested(struct btree_trans *trans, struct inode_ continue; } if (i->inode.bi_nlink != i->count) { CLASS(printbuf, buf)(); lockrestart_do(trans, bch2_inum_snapshot_to_path(trans, w->last_pos.inode, i->inode.bi_snapshot, NULL, &buf)); if (fsck_err_on(i->inode.bi_nlink != i->count, trans, inode_dir_wrong_nlink, "directory %llu:%u with wrong i_nlink: got %u, should be %llu", w->last_pos.inode, i->inode.bi_snapshot, i->inode.bi_nlink, i->count)) { "directory with wrong i_nlink: got %u, should be %llu\n%s", i->inode.bi_nlink, i->count, buf.buf)) { i->inode.bi_nlink = i->count; ret = bch2_fsck_write_inode(trans, &i->inode); if (ret) break; } } } fsck_err: bch_err_fn(c, ret); return ret; Loading Loading
fs/bcachefs/fsck.c +16 −8 Original line number Diff line number Diff line Loading @@ -2066,16 +2066,24 @@ static int check_subdir_count_notnested(struct btree_trans *trans, struct inode_ continue; } if (i->inode.bi_nlink != i->count) { CLASS(printbuf, buf)(); lockrestart_do(trans, bch2_inum_snapshot_to_path(trans, w->last_pos.inode, i->inode.bi_snapshot, NULL, &buf)); if (fsck_err_on(i->inode.bi_nlink != i->count, trans, inode_dir_wrong_nlink, "directory %llu:%u with wrong i_nlink: got %u, should be %llu", w->last_pos.inode, i->inode.bi_snapshot, i->inode.bi_nlink, i->count)) { "directory with wrong i_nlink: got %u, should be %llu\n%s", i->inode.bi_nlink, i->count, buf.buf)) { i->inode.bi_nlink = i->count; ret = bch2_fsck_write_inode(trans, &i->inode); if (ret) break; } } } fsck_err: bch_err_fn(c, ret); return ret; Loading