[PATCH 6/7] xfs: add xfs_verifier_error()
Eric Sandeen
sandeen at sandeen.net
Thu Feb 13 21:56:35 CST 2014
On 2/10/14, 9:14 PM, Eric Sandeen wrote:
> We want to distinguish between corruption and CRC errors.
> In addition, the full stack trace on verifier errors
> seems less than helpful; it looks more like an oops than
> corruption.
>
> Create a new function to specifically alert the user to
> verifier errors, which can differentiate between
> EFSCORRUPTED and CRC mismatches. It doesn't dump stack
> unless the xfs error level is turned up high.
>
> Define a new error message (EFSBADCRC) to clearly identify
> CRC errors. (Defined to EILSEQ, bad byte sequence)
>
> Signed-off-by: Eric Sandeen <sandeen at redhat.com>
...
> +void
> +xfs_verifier_error(
> + struct xfs_buf *bp)
> +{
> + struct xfs_mount *mp = bp->b_target->bt_mount;
> +
> + xfs_alert(mp,
> +"Metadata %s detected at %pF, block 0x%llx. Unmount and run xfs_repair",
> + bp->b_error == EFSBADCRC ? "CRC error" : "corruption",
> + __builtin_return_address(0), bp->b_bn);
> +
> + if (xfs_error_level >= XFS_ERRLEVEL_LOW)
> + xfs_hex_dump(bp->b_addr, 64);
This needs to handle the case where we have a page array rather than a b_addr, as well.
(The existing calls to XFS_CORRUPTION_ERROR would have oopsed on this too)
-Eric
More information about the xfs
mailing list