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.
Source kernel commit:
e83cf875d67a6cb9ddfaa8b45d2fa93d12b5c66f
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
#define xfs_buf_verifier_error(bp,e,n,bu,bus,fa) \
xfs_verifier_error(bp, e, fa)
void
-xfs_buf_corruption_error(struct xfs_buf *bp);
+xfs_buf_corruption_error(struct xfs_buf *bp, xfs_failaddr_t fa);
/* XXX: this is clearly a bug - a shared header needs to export this */
/* xfs_rtalloc.c */
{
ASSERT(bp->b_flags & XBF_DONE);
- xfs_buf_corruption_error(bp);
+ xfs_buf_corruption_error(bp, fa);
xfs_buf_stale(bp);
}
*/
void
xfs_buf_corruption_error(
- struct xfs_buf *bp)
+ struct xfs_buf *bp,
+ xfs_failaddr_t fa)
{
xfs_alert(NULL, "Metadata corruption detected at %p, %s block 0x%llx",
- __return_address, bp->b_ops->name, bp->b_bn);
+ fa, bp->b_ops->name, bp->b_bn);
}
/*