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>
This commit is contained in:
committed by
Alex Elder
parent
4347b9d7ad
commit
901796afca
@@ -183,8 +183,7 @@ xlog_bread_noalign(
|
||||
xfsbdstrat(log->l_mp, bp);
|
||||
error = xfs_buf_iowait(bp);
|
||||
if (error)
|
||||
xfs_ioerror_alert("xlog_bread", log->l_mp,
|
||||
bp, XFS_BUF_ADDR(bp));
|
||||
xfs_buf_ioerror_alert(bp, __func__);
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -269,10 +268,8 @@ xlog_bwrite(
|
||||
XFS_BUF_SET_COUNT(bp, BBTOB(nbblks));
|
||||
|
||||
error = xfs_bwrite(bp);
|
||||
if (error) {
|
||||
xfs_ioerror_alert("xlog_bwrite", log->l_mp,
|
||||
bp, XFS_BUF_ADDR(bp));
|
||||
}
|
||||
if (error)
|
||||
xfs_buf_ioerror_alert(bp, __func__);
|
||||
xfs_buf_relse(bp);
|
||||
return error;
|
||||
}
|
||||
@@ -364,9 +361,7 @@ xlog_recover_iodone(
|
||||
* We're not going to bother about retrying
|
||||
* this during recovery. One strike!
|
||||
*/
|
||||
xfs_ioerror_alert("xlog_recover_iodone",
|
||||
bp->b_target->bt_mount, bp,
|
||||
XFS_BUF_ADDR(bp));
|
||||
xfs_buf_ioerror_alert(bp, __func__);
|
||||
xfs_force_shutdown(bp->b_target->bt_mount,
|
||||
SHUTDOWN_META_IO_ERROR);
|
||||
}
|
||||
@@ -2138,8 +2133,7 @@ xlog_recover_buffer_pass2(
|
||||
return XFS_ERROR(ENOMEM);
|
||||
error = bp->b_error;
|
||||
if (error) {
|
||||
xfs_ioerror_alert("xlog_recover_do..(read#1)", mp,
|
||||
bp, buf_f->blf_blkno);
|
||||
xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#1)");
|
||||
xfs_buf_relse(bp);
|
||||
return error;
|
||||
}
|
||||
@@ -2234,8 +2228,7 @@ xlog_recover_inode_pass2(
|
||||
}
|
||||
error = bp->b_error;
|
||||
if (error) {
|
||||
xfs_ioerror_alert("xlog_recover_do..(read#2)", mp,
|
||||
bp, in_f->ilf_blkno);
|
||||
xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#2)");
|
||||
xfs_buf_relse(bp);
|
||||
goto error;
|
||||
}
|
||||
@@ -2542,8 +2535,7 @@ xlog_recover_dquot_pass2(
|
||||
XFS_FSB_TO_BB(mp, dq_f->qlf_len),
|
||||
0, &bp);
|
||||
if (error) {
|
||||
xfs_ioerror_alert("xlog_recover_do..(read#3)", mp,
|
||||
bp, dq_f->qlf_blkno);
|
||||
xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#3)");
|
||||
return error;
|
||||
}
|
||||
ASSERT(bp);
|
||||
@@ -3695,8 +3687,7 @@ xlog_do_recover(
|
||||
xfsbdstrat(log->l_mp, bp);
|
||||
error = xfs_buf_iowait(bp);
|
||||
if (error) {
|
||||
xfs_ioerror_alert("xlog_do_recover",
|
||||
log->l_mp, bp, XFS_BUF_ADDR(bp));
|
||||
xfs_buf_ioerror_alert(bp, __func__);
|
||||
ASSERT(0);
|
||||
xfs_buf_relse(bp);
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user