bcachefs: ratelimit informational fsck errors
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 2 Apr 2024 22:57:05 +0000 (18:57 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 3 Apr 2024 00:24:00 +0000 (20:24 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fsck.c

index cbb8b43e419fecbbaf1177d09729ad1b6e014186..b704fb0dda951b37f0afd9268b92c386fa588665 100644 (file)
@@ -1131,8 +1131,8 @@ static int check_i_sectors_notnested(struct btree_trans *trans, struct inode_wal
                        i->count = count2;
 
                if (i->count != count2) {
-                       bch_err(c, "fsck counted i_sectors wrong for inode %llu:%u: got %llu should be %llu",
-                               w->last_pos.inode, i->snapshot, i->count, count2);
+                       bch_err_ratelimited(c, "fsck counted i_sectors wrong for inode %llu:%u: got %llu should be %llu",
+                                           w->last_pos.inode, i->snapshot, i->count, count2);
                        return -BCH_ERR_internal_fsck_err;
                }
 
@@ -1587,8 +1587,8 @@ static int check_subdir_count_notnested(struct btree_trans *trans, struct inode_
                        return count2;
 
                if (i->count != count2) {
-                       bch_err(c, "fsck counted subdirectories wrong: got %llu should be %llu",
-                               i->count, count2);
+                       bch_err_ratelimited(c, "fsck counted subdirectories wrong for inum %llu:%u: got %llu should be %llu",
+                                           w->last_pos.inode, i->snapshot, i->count, count2);
                        i->count = count2;
                        if (i->inode.bi_nlink == i->count)
                                continue;