xfs_error.c (320424c7d44f54c18df9812fd7c45f6963524002) xfs_error.c (9343ee76909e3f6466d85c9ebb0e343cdf54de71)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6#include "xfs.h"
7#include "xfs_shared.h"
8#include "xfs_format.h"

--- 357 unchanged lines hidden (view full) ---

366xfs_buf_corruption_error(
367 struct xfs_buf *bp,
368 xfs_failaddr_t fa)
369{
370 struct xfs_mount *mp = bp->b_mount;
371
372 xfs_alert_tag(mp, XFS_PTAG_VERIFIER_ERROR,
373 "Metadata corruption detected at %pS, %s block 0x%llx",
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6#include "xfs.h"
7#include "xfs_shared.h"
8#include "xfs_format.h"

--- 357 unchanged lines hidden (view full) ---

366xfs_buf_corruption_error(
367 struct xfs_buf *bp,
368 xfs_failaddr_t fa)
369{
370 struct xfs_mount *mp = bp->b_mount;
371
372 xfs_alert_tag(mp, XFS_PTAG_VERIFIER_ERROR,
373 "Metadata corruption detected at %pS, %s block 0x%llx",
374 fa, bp->b_ops->name, bp->b_bn);
374 fa, bp->b_ops->name, xfs_buf_daddr(bp));
375
376 xfs_alert(mp, "Unmount and run xfs_repair");
377
378 if (xfs_error_level >= XFS_ERRLEVEL_HIGH)
379 xfs_stack_trace();
380}
381
382/*

--- 14 unchanged lines hidden (view full) ---

397 int sz;
398
399 fa = failaddr ? failaddr : __return_address;
400 __xfs_buf_ioerror(bp, error, fa);
401
402 xfs_alert_tag(mp, XFS_PTAG_VERIFIER_ERROR,
403 "Metadata %s detected at %pS, %s block 0x%llx %s",
404 bp->b_error == -EFSBADCRC ? "CRC error" : "corruption",
375
376 xfs_alert(mp, "Unmount and run xfs_repair");
377
378 if (xfs_error_level >= XFS_ERRLEVEL_HIGH)
379 xfs_stack_trace();
380}
381
382/*

--- 14 unchanged lines hidden (view full) ---

397 int sz;
398
399 fa = failaddr ? failaddr : __return_address;
400 __xfs_buf_ioerror(bp, error, fa);
401
402 xfs_alert_tag(mp, XFS_PTAG_VERIFIER_ERROR,
403 "Metadata %s detected at %pS, %s block 0x%llx %s",
404 bp->b_error == -EFSBADCRC ? "CRC error" : "corruption",
405 fa, bp->b_ops->name, bp->b_bn, name);
405 fa, bp->b_ops->name, xfs_buf_daddr(bp), name);
406
407 xfs_alert(mp, "Unmount and run xfs_repair");
408
409 if (xfs_error_level >= XFS_ERRLEVEL_LOW) {
410 sz = min_t(size_t, XFS_CORRUPTION_DUMP_LEN, bufsz);
411 xfs_alert(mp, "First %d bytes of corrupted metadata buffer:",
412 sz);
413 xfs_hex_dump(buf, sz);

--- 55 unchanged lines hidden ---
406
407 xfs_alert(mp, "Unmount and run xfs_repair");
408
409 if (xfs_error_level >= XFS_ERRLEVEL_LOW) {
410 sz = min_t(size_t, XFS_CORRUPTION_DUMP_LEN, bufsz);
411 xfs_alert(mp, "First %d bytes of corrupted metadata buffer:",
412 sz);
413 xfs_hex_dump(buf, sz);

--- 55 unchanged lines hidden ---