aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2015-02-23 06:39:13 -0500
committerDave Chinner <david@fromorbit.com>2015-02-23 06:39:13 -0500
commit5fb5aeeeb65726c62dc39986d7a080309259e29c (patch)
tree5eef97a1acb0e3c01020a25867ca1891fa63fe01 /fs/xfs/libxfs/xfs_ialloc.c
parentc29aad41159829c0e1dcbf06c8e02284993b7901 (diff)
xfs: pass mp to XFS_WANT_CORRUPTED_RETURN
Today, if we hit an XFS_WANT_CORRUPTED_RETURN we don't print any information about which filesystem hit it. Passing in the mp allows us to print the filesystem (device) name, which is a pretty critical piece of information. Tested by running fsfuzzer 'til I hit some. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/libxfs/xfs_ialloc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index f95c4ae46e28..db0444893e96 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -700,7 +700,7 @@ xfs_ialloc_next_rec(
700 error = xfs_inobt_get_rec(cur, rec, &i); 700 error = xfs_inobt_get_rec(cur, rec, &i);
701 if (error) 701 if (error)
702 return error; 702 return error;
703 XFS_WANT_CORRUPTED_RETURN(i == 1); 703 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, i == 1);
704 } 704 }
705 705
706 return 0; 706 return 0;
@@ -724,7 +724,7 @@ xfs_ialloc_get_rec(
724 error = xfs_inobt_get_rec(cur, rec, &i); 724 error = xfs_inobt_get_rec(cur, rec, &i);
725 if (error) 725 if (error)
726 return error; 726 return error;
727 XFS_WANT_CORRUPTED_RETURN(i == 1); 727 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, i == 1);
728 } 728 }
729 729
730 return 0; 730 return 0;
@@ -1016,7 +1016,7 @@ xfs_dialloc_ag_finobt_near(
1016 error = xfs_inobt_get_rec(lcur, rec, &i); 1016 error = xfs_inobt_get_rec(lcur, rec, &i);
1017 if (error) 1017 if (error)
1018 return error; 1018 return error;
1019 XFS_WANT_CORRUPTED_RETURN(i == 1); 1019 XFS_WANT_CORRUPTED_RETURN(lcur->bc_mp, i == 1);
1020 1020
1021 /* 1021 /*
1022 * See if we've landed in the parent inode record. The finobt 1022 * See if we've landed in the parent inode record. The finobt
@@ -1095,7 +1095,7 @@ xfs_dialloc_ag_finobt_newino(
1095 error = xfs_inobt_get_rec(cur, rec, &i); 1095 error = xfs_inobt_get_rec(cur, rec, &i);
1096 if (error) 1096 if (error)
1097 return error; 1097 return error;
1098 XFS_WANT_CORRUPTED_RETURN(i == 1); 1098 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, i == 1);
1099 return 0; 1099 return 0;
1100 } 1100 }
1101 } 1101 }
@@ -1106,12 +1106,12 @@ xfs_dialloc_ag_finobt_newino(
1106 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i); 1106 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i);
1107 if (error) 1107 if (error)
1108 return error; 1108 return error;
1109 XFS_WANT_CORRUPTED_RETURN(i == 1); 1109 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, i == 1);
1110 1110
1111 error = xfs_inobt_get_rec(cur, rec, &i); 1111 error = xfs_inobt_get_rec(cur, rec, &i);
1112 if (error) 1112 if (error)
1113 return error; 1113 return error;
1114 XFS_WANT_CORRUPTED_RETURN(i == 1); 1114 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, i == 1);
1115 1115
1116 return 0; 1116 return 0;
1117} 1117}
@@ -1133,19 +1133,19 @@ xfs_dialloc_ag_update_inobt(
1133 error = xfs_inobt_lookup(cur, frec->ir_startino, XFS_LOOKUP_EQ, &i); 1133 error = xfs_inobt_lookup(cur, frec->ir_startino, XFS_LOOKUP_EQ, &i);
1134 if (error) 1134 if (error)
1135 return error; 1135 return error;
1136 XFS_WANT_CORRUPTED_RETURN(i == 1); 1136 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, i == 1);
1137 1137
1138 error = xfs_inobt_get_rec(cur, &rec, &i); 1138 error = xfs_inobt_get_rec(cur, &rec, &i);
1139 if (error) 1139 if (error)
1140 return error; 1140 return error;
1141 XFS_WANT_CORRUPTED_RETURN(i == 1); 1141 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, i == 1);
1142 ASSERT((XFS_AGINO_TO_OFFSET(cur->bc_mp, rec.ir_startino) % 1142 ASSERT((XFS_AGINO_TO_OFFSET(cur->bc_mp, rec.ir_startino) %
1143 XFS_INODES_PER_CHUNK) == 0); 1143 XFS_INODES_PER_CHUNK) == 0);
1144 1144
1145 rec.ir_free &= ~XFS_INOBT_MASK(offset); 1145 rec.ir_free &= ~XFS_INOBT_MASK(offset);
1146 rec.ir_freecount--; 1146 rec.ir_freecount--;
1147 1147
1148 XFS_WANT_CORRUPTED_RETURN((rec.ir_free == frec->ir_free) && 1148 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, (rec.ir_free == frec->ir_free) &&
1149 (rec.ir_freecount == frec->ir_freecount)); 1149 (rec.ir_freecount == frec->ir_freecount));
1150 1150
1151 return xfs_inobt_update(cur, &rec); 1151 return xfs_inobt_update(cur, &rec);