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
@@ -91,24 +91,6 @@ xfs_do_force_shutdown(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints out an ALERT message about I/O error.
|
||||
*/
|
||||
void
|
||||
xfs_ioerror_alert(
|
||||
char *func,
|
||||
struct xfs_mount *mp,
|
||||
xfs_buf_t *bp,
|
||||
xfs_daddr_t blkno)
|
||||
{
|
||||
xfs_alert(mp,
|
||||
"I/O error occurred: meta-data dev %s block 0x%llx"
|
||||
" (\"%s\") error %d buf count %zd",
|
||||
xfs_buf_target_name(bp->b_target),
|
||||
(__uint64_t)blkno, func,
|
||||
bp->b_error, XFS_BUF_COUNT(bp));
|
||||
}
|
||||
|
||||
/*
|
||||
* This isn't an absolute requirement, but it is
|
||||
* just a good idea to call xfs_read_buf instead of
|
||||
@@ -143,7 +125,7 @@ xfs_read_buf(
|
||||
} else {
|
||||
*bpp = NULL;
|
||||
if (error) {
|
||||
xfs_ioerror_alert("xfs_read_buf", mp, bp, XFS_BUF_ADDR(bp));
|
||||
xfs_buf_ioerror_alert(bp, __func__);
|
||||
} else {
|
||||
error = XFS_ERROR(EIO);
|
||||
}
|
||||
|
Reference in New Issue
Block a user