diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-03-23 18:06:53 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-03-24 02:05:07 +0100 |
commit | 6edb181053f067cee64d4239830062cb40ddab00 (patch) | |
tree | 496af515b3a421812a727d0fed2c3d6e6f9f656d /fs/xfs/libxfs | |
parent | xfs: refactor inode verifier error logging (diff) | |
download | linux-6edb181053f067cee64d4239830062cb40ddab00.tar.xz 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')
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_buf.c | 4 |
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); |