summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_error.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-01-08 21:51:26 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2018-01-08 21:54:47 +0300
commit9c712a1346b214a92f4a0e5bb4de4c075de65c32 (patch)
tree7cd7e9e54e4e2f5d3996fc55b0b0ecc8c2c9ab55 /fs/xfs/xfs_error.c
parentd9418ed08ae1fa025c96498d95ba30cbb934e119 (diff)
downloadlinux-9c712a1346b214a92f4a0e5bb4de4c075de65c32.tar.xz
xfs: dump the first 128 bytes of any corrupt buffer
Increase the corrupt buffer dump to the first 128 bytes since v5 filesystems have larger block headers than before. 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
index be1211a851dc..980d5f0660b5 100644
--- a/fs/xfs/xfs_error.c
+++ b/fs/xfs/xfs_error.c
@@ -336,7 +336,7 @@ xfs_corruption_error(
xfs_failaddr_t failaddr)
{
if (level <= xfs_error_level)
- xfs_hex_dump(p, 64);
+ xfs_hex_dump(p, XFS_CORRUPTION_DUMP_LEN);
xfs_error_report(tag, level, mp, filename, linenum, failaddr);
xfs_alert(mp, "Corruption detected. Unmount and run xfs_repair");
}
@@ -364,8 +364,9 @@ xfs_verifier_error(
xfs_alert(mp, "Unmount and run xfs_repair");
if (xfs_error_level >= XFS_ERRLEVEL_LOW) {
- xfs_alert(mp, "First 64 bytes of corrupted metadata buffer:");
- xfs_hex_dump(xfs_buf_offset(bp, 0), 64);
+ xfs_alert(mp, "First %d bytes of corrupted metadata buffer:",
+ XFS_CORRUPTION_DUMP_LEN);
+ xfs_hex_dump(xfs_buf_offset(bp, 0), XFS_CORRUPTION_DUMP_LEN);
}
if (xfs_error_level >= XFS_ERRLEVEL_HIGH)