aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans_buf.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-10-10 12:52:49 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:10 -0400
commit901796afca0d31d97bf6d1bf2ab251a93a4b8c83 (patch)
tree85f204657d81700492487acbf39fb9702e6b0842 /fs/xfs/xfs_trans_buf.c
parent4347b9d7ad4223474d315c3ab6bc1ce7cce7fa2d (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_trans_buf.c')
-rw-r--r--fs/xfs/xfs_trans_buf.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
index 5bab5980a6f9..475a4ded4f41 100644
--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -296,8 +296,7 @@ xfs_trans_read_buf(
296 296
297 if (bp->b_error) { 297 if (bp->b_error) {
298 error = bp->b_error; 298 error = bp->b_error;
299 xfs_ioerror_alert("xfs_trans_read_buf", mp, 299 xfs_buf_ioerror_alert(bp, __func__);
300 bp, blkno);
301 xfs_buf_relse(bp); 300 xfs_buf_relse(bp);
302 return error; 301 return error;
303 } 302 }
@@ -339,8 +338,7 @@ xfs_trans_read_buf(
339 xfsbdstrat(tp->t_mountp, bp); 338 xfsbdstrat(tp->t_mountp, bp);
340 error = xfs_buf_iowait(bp); 339 error = xfs_buf_iowait(bp);
341 if (error) { 340 if (error) {
342 xfs_ioerror_alert("xfs_trans_read_buf", mp, 341 xfs_buf_ioerror_alert(bp, __func__);
343 bp, blkno);
344 xfs_buf_relse(bp); 342 xfs_buf_relse(bp);
345 /* 343 /*
346 * We can gracefully recover from most read 344 * We can gracefully recover from most read
@@ -391,8 +389,7 @@ xfs_trans_read_buf(
391 error = bp->b_error; 389 error = bp->b_error;
392 xfs_buf_stale(bp); 390 xfs_buf_stale(bp);
393 XFS_BUF_DONE(bp); 391 XFS_BUF_DONE(bp);
394 xfs_ioerror_alert("xfs_trans_read_buf", mp, 392 xfs_buf_ioerror_alert(bp, __func__);
395 bp, blkno);
396 if (tp->t_flags & XFS_TRANS_DIRTY) 393 if (tp->t_flags & XFS_TRANS_DIRTY)
397 xfs_force_shutdown(tp->t_mountp, SHUTDOWN_META_IO_ERROR); 394 xfs_force_shutdown(tp->t_mountp, SHUTDOWN_META_IO_ERROR);
398 xfs_buf_relse(bp); 395 xfs_buf_relse(bp);