diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-10-10 12:52:49 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-10-11 22:15:10 -0400 |
commit | 901796afca0d31d97bf6d1bf2ab251a93a4b8c83 (patch) | |
tree | 85f204657d81700492487acbf39fb9702e6b0842 /fs/xfs/xfs_log_recover.c | |
parent | 4347b9d7ad4223474d315c3ab6bc1ce7cce7fa2d (diff) |
xfs: clean up xfs_ioerror_alert
Instead of passing the block number and mount structure explicitly
get them off the bp and fix make the argument order more natural.
Also move it to xfs_buf.c and stop printing the device name given
that we already get the fs name as part of xfs_alert, and we know
what device is operates on because of the caller that gets printed,
finally rename it to xfs_buf_ioerror_alert and pass __func__ as
argument where it makes sense.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 8f70f3469997..82ee9db628ed 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -183,8 +183,7 @@ xlog_bread_noalign( | |||
183 | xfsbdstrat(log->l_mp, bp); | 183 | xfsbdstrat(log->l_mp, bp); |
184 | error = xfs_buf_iowait(bp); | 184 | error = xfs_buf_iowait(bp); |
185 | if (error) | 185 | if (error) |
186 | xfs_ioerror_alert("xlog_bread", log->l_mp, | 186 | xfs_buf_ioerror_alert(bp, __func__); |
187 | bp, XFS_BUF_ADDR(bp)); | ||
188 | return error; | 187 | return error; |
189 | } | 188 | } |
190 | 189 | ||
@@ -269,10 +268,8 @@ xlog_bwrite( | |||
269 | XFS_BUF_SET_COUNT(bp, BBTOB(nbblks)); | 268 | XFS_BUF_SET_COUNT(bp, BBTOB(nbblks)); |
270 | 269 | ||
271 | error = xfs_bwrite(bp); | 270 | error = xfs_bwrite(bp); |
272 | if (error) { | 271 | if (error) |
273 | xfs_ioerror_alert("xlog_bwrite", log->l_mp, | 272 | xfs_buf_ioerror_alert(bp, __func__); |
274 | bp, XFS_BUF_ADDR(bp)); | ||
275 | } | ||
276 | xfs_buf_relse(bp); | 273 | xfs_buf_relse(bp); |
277 | return error; | 274 | return error; |
278 | } | 275 | } |
@@ -364,9 +361,7 @@ xlog_recover_iodone( | |||
364 | * We're not going to bother about retrying | 361 | * We're not going to bother about retrying |
365 | * this during recovery. One strike! | 362 | * this during recovery. One strike! |
366 | */ | 363 | */ |
367 | xfs_ioerror_alert("xlog_recover_iodone", | 364 | xfs_buf_ioerror_alert(bp, __func__); |
368 | bp->b_target->bt_mount, bp, | ||
369 | XFS_BUF_ADDR(bp)); | ||
370 | xfs_force_shutdown(bp->b_target->bt_mount, | 365 | xfs_force_shutdown(bp->b_target->bt_mount, |
371 | SHUTDOWN_META_IO_ERROR); | 366 | SHUTDOWN_META_IO_ERROR); |
372 | } | 367 | } |
@@ -2138,8 +2133,7 @@ xlog_recover_buffer_pass2( | |||
2138 | return XFS_ERROR(ENOMEM); | 2133 | return XFS_ERROR(ENOMEM); |
2139 | error = bp->b_error; | 2134 | error = bp->b_error; |
2140 | if (error) { | 2135 | if (error) { |
2141 | xfs_ioerror_alert("xlog_recover_do..(read#1)", mp, | 2136 | xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#1)"); |
2142 | bp, buf_f->blf_blkno); | ||
2143 | xfs_buf_relse(bp); | 2137 | xfs_buf_relse(bp); |
2144 | return error; | 2138 | return error; |
2145 | } | 2139 | } |
@@ -2234,8 +2228,7 @@ xlog_recover_inode_pass2( | |||
2234 | } | 2228 | } |
2235 | error = bp->b_error; | 2229 | error = bp->b_error; |
2236 | if (error) { | 2230 | if (error) { |
2237 | xfs_ioerror_alert("xlog_recover_do..(read#2)", mp, | 2231 | xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#2)"); |
2238 | bp, in_f->ilf_blkno); | ||
2239 | xfs_buf_relse(bp); | 2232 | xfs_buf_relse(bp); |
2240 | goto error; | 2233 | goto error; |
2241 | } | 2234 | } |
@@ -2542,8 +2535,7 @@ xlog_recover_dquot_pass2( | |||
2542 | XFS_FSB_TO_BB(mp, dq_f->qlf_len), | 2535 | XFS_FSB_TO_BB(mp, dq_f->qlf_len), |
2543 | 0, &bp); | 2536 | 0, &bp); |
2544 | if (error) { | 2537 | if (error) { |
2545 | xfs_ioerror_alert("xlog_recover_do..(read#3)", mp, | 2538 | xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#3)"); |
2546 | bp, dq_f->qlf_blkno); | ||
2547 | return error; | 2539 | return error; |
2548 | } | 2540 | } |
2549 | ASSERT(bp); | 2541 | ASSERT(bp); |
@@ -3695,8 +3687,7 @@ xlog_do_recover( | |||
3695 | xfsbdstrat(log->l_mp, bp); | 3687 | xfsbdstrat(log->l_mp, bp); |
3696 | error = xfs_buf_iowait(bp); | 3688 | error = xfs_buf_iowait(bp); |
3697 | if (error) { | 3689 | if (error) { |
3698 | xfs_ioerror_alert("xlog_do_recover", | 3690 | xfs_buf_ioerror_alert(bp, __func__); |
3699 | log->l_mp, bp, XFS_BUF_ADDR(bp)); | ||
3700 | ASSERT(0); | 3691 | ASSERT(0); |
3701 | xfs_buf_relse(bp); | 3692 | xfs_buf_relse(bp); |
3702 | return error; | 3693 | return error; |