diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-11 18:37:54 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-12 15:58:12 +0100 |
commit | e83cf875d67a6cb9ddfaa8b45d2fa93d12b5c66f (patch) | |
tree | 89ed9aacd12e239053f844b373b00be499be2621 /fs/xfs/xfs_error.c | |
parent | xfs: add a function to deal with corrupt buffers post-verifiers (diff) | |
download | linux-e83cf875d67a6cb9ddfaa8b45d2fa93d12b5c66f.tar.xz linux-e83cf875d67a6cb9ddfaa8b45d2fa93d12b5c66f.zip |
xfs: xfs_buf_corruption_error should take __this_address
Add a xfs_failaddr_t parameter to this function so that callers can
potentially pass in (and therefore report) the exact point in the code
where we decided that a metadata buffer was corrupt. This enables us to
wire it up to checking functions that have to run outside of verifiers.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_error.c')
-rw-r--r-- | fs/xfs/xfs_error.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index 57068d4ffba2..a21e9cc6516a 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c @@ -350,13 +350,14 @@ xfs_corruption_error( */ void xfs_buf_corruption_error( - struct xfs_buf *bp) + struct xfs_buf *bp, + xfs_failaddr_t fa) { struct xfs_mount *mp = bp->b_mount; xfs_alert_tag(mp, XFS_PTAG_VERIFIER_ERROR, "Metadata corruption detected at %pS, %s block 0x%llx", - __return_address, bp->b_ops->name, bp->b_bn); + fa, bp->b_ops->name, bp->b_bn); xfs_alert(mp, "Unmount and run xfs_repair"); |