diff options
author | Dave Chinner <david@fromorbit.com> | 2014-03-13 19:12:33 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-03-13 19:12:33 +1100 |
commit | 49ae4b97d760d2e63394b96a7e14cbb43b9dc942 (patch) | |
tree | 628ea715021b8adce4f120965b40b47ff15d7b8c /fs/xfs/xfs_alloc_btree.c | |
parent | 730357a5cb72d9754a396a350653ff98a9e44783 (diff) | |
parent | ce5028cfe3ca48695b6a128638fe224426d37ebe (diff) | |
download | op-kernel-dev-49ae4b97d760d2e63394b96a7e14cbb43b9dc942.zip op-kernel-dev-49ae4b97d760d2e63394b96a7e14cbb43b9dc942.tar.gz |
Merge branch 'xfs-verifier-cleanup' into for-next
Diffstat (limited to 'fs/xfs/xfs_alloc_btree.c')
-rw-r--r-- | fs/xfs/xfs_alloc_btree.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c index 1308542..cc1eadc 100644 --- a/fs/xfs/xfs_alloc_btree.c +++ b/fs/xfs/xfs_alloc_btree.c @@ -355,12 +355,14 @@ static void xfs_allocbt_read_verify( struct xfs_buf *bp) { - if (!(xfs_btree_sblock_verify_crc(bp) && - xfs_allocbt_verify(bp))) { - trace_xfs_btree_corrupt(bp, _RET_IP_); - XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, - bp->b_target->bt_mount, bp->b_addr); + if (!xfs_btree_sblock_verify_crc(bp)) + xfs_buf_ioerror(bp, EFSBADCRC); + else if (!xfs_allocbt_verify(bp)) xfs_buf_ioerror(bp, EFSCORRUPTED); + + if (bp->b_error) { + trace_xfs_btree_corrupt(bp, _RET_IP_); + xfs_verifier_error(bp); } } @@ -370,9 +372,9 @@ xfs_allocbt_write_verify( { if (!xfs_allocbt_verify(bp)) { trace_xfs_btree_corrupt(bp, _RET_IP_); - XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, - bp->b_target->bt_mount, bp->b_addr); xfs_buf_ioerror(bp, EFSCORRUPTED); + xfs_verifier_error(bp); + return; } xfs_btree_sblock_calc_crc(bp); |