aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_inode_buf.c
diff options
context:
space:
mode:
authorGravatar Darrick J. Wong <darrick.wong@oracle.com> 2018-03-23 10:06:53 -0700
committerGravatar Darrick J. Wong <darrick.wong@oracle.com> 2018-03-23 18:05:07 -0700
commit6edb181053f067cee64d4239830062cb40ddab00 (patch)
tree496af515b3a421812a727d0fed2c3d6e6f9f656d /fs/xfs/libxfs/xfs_inode_buf.c
parentxfs: refactor inode verifier error logging (diff)
downloadlinux-6edb181053f067cee64d4239830062cb40ddab00.tar.gz
linux-6edb181053f067cee64d4239830062cb40ddab00.tar.bz2
linux-6edb181053f067cee64d4239830062cb40ddab00.zip
xfs: refactor inode buffer verifier error logging
When the inode buffer verifier encounters an error, it's much more helpful to print a buffer from the offending inode instead of just the start of the inode chunk buffer. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_buf.c')
-rw-r--r--fs/xfs/libxfs/xfs_inode_buf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
index 4fe17b368316..51019e5dc16d 100644
--- a/fs/xfs/libxfs/xfs_inode_buf.c
+++ b/fs/xfs/libxfs/xfs_inode_buf.c
@@ -115,13 +115,15 @@ xfs_inode_buf_verify(
return;
}
- xfs_verifier_error(bp, -EFSCORRUPTED, __this_address);
#ifdef DEBUG
xfs_alert(mp,
"bad inode magic/vsn daddr %lld #%d (magic=%x)",
(unsigned long long)bp->b_bn, i,
be16_to_cpu(dip->di_magic));
#endif
+ xfs_buf_verifier_error(bp, -EFSCORRUPTED,
+ __func__, dip, sizeof(*dip),
+ NULL);
}
}
xfs_inobp_check(mp, bp);