aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.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_log.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_log.c')
-rw-r--r--fs/xfs/xfs_log.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 8c9db4e5ddd2..2758a6277c52 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -880,7 +880,7 @@ xlog_iodone(xfs_buf_t *bp)
880 */ 880 */
881 if (XFS_TEST_ERROR((xfs_buf_geterror(bp)), l->l_mp, 881 if (XFS_TEST_ERROR((xfs_buf_geterror(bp)), l->l_mp,
882 XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) { 882 XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) {
883 xfs_ioerror_alert("xlog_iodone", l->l_mp, bp, XFS_BUF_ADDR(bp)); 883 xfs_buf_ioerror_alert(bp, __func__);
884 xfs_buf_stale(bp); 884 xfs_buf_stale(bp);
885 xfs_force_shutdown(l->l_mp, SHUTDOWN_LOG_IO_ERROR); 885 xfs_force_shutdown(l->l_mp, SHUTDOWN_LOG_IO_ERROR);
886 /* 886 /*
@@ -1387,9 +1387,9 @@ xlog_sync(xlog_t *log,
1387 */ 1387 */
1388 XFS_BUF_WRITE(bp); 1388 XFS_BUF_WRITE(bp);
1389 1389
1390 if ((error = xlog_bdstrat(bp))) { 1390 error = xlog_bdstrat(bp);
1391 xfs_ioerror_alert("xlog_sync", log->l_mp, bp, 1391 if (error) {
1392 XFS_BUF_ADDR(bp)); 1392 xfs_buf_ioerror_alert(bp, "xlog_sync");
1393 return error; 1393 return error;
1394 } 1394 }
1395 if (split) { 1395 if (split) {
@@ -1423,9 +1423,9 @@ xlog_sync(xlog_t *log,
1423 /* account for internal log which doesn't start at block #0 */ 1423 /* account for internal log which doesn't start at block #0 */
1424 XFS_BUF_SET_ADDR(bp, XFS_BUF_ADDR(bp) + log->l_logBBstart); 1424 XFS_BUF_SET_ADDR(bp, XFS_BUF_ADDR(bp) + log->l_logBBstart);
1425 XFS_BUF_WRITE(bp); 1425 XFS_BUF_WRITE(bp);
1426 if ((error = xlog_bdstrat(bp))) { 1426 error = xlog_bdstrat(bp);
1427 xfs_ioerror_alert("xlog_sync (split)", log->l_mp, 1427 if (error) {
1428 bp, XFS_BUF_ADDR(bp)); 1428 xfs_buf_ioerror_alert(bp, "xlog_sync (split)");
1429 return error; 1429 return error;
1430 } 1430 }
1431 } 1431 }