aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2014-02-26 23:14:31 -0500
committerDave Chinner <david@fromorbit.com>2014-02-26 23:14:31 -0500
commite0d2c23a253149b4f8a6100f94ca62ddc4b2ae84 (patch)
treebc122db2c8798f719e48a3713c0a2b9fb00b1a20
parent5ef11eb0700f806c4671ba33e5befa784a2f70ef (diff)
xfs: skip pointless CRC updates after verifier failures
Most write verifiers don't update CRCs after the verifier has failed and the buffer has been marked in error. These two didn't, but should. Add returns to the verifier failure block, since the buffer won't be written anyway. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Jie Liu <jeff.liu@oracle.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r--fs/xfs/xfs_alloc_btree.c1
-rw-r--r--fs/xfs/xfs_ialloc_btree.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c
index 13085429e523..144d3b0855fb 100644
--- a/fs/xfs/xfs_alloc_btree.c
+++ b/fs/xfs/xfs_alloc_btree.c
@@ -373,6 +373,7 @@ xfs_allocbt_write_verify(
373 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, 373 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW,
374 bp->b_target->bt_mount, bp->b_addr); 374 bp->b_target->bt_mount, bp->b_addr);
375 xfs_buf_ioerror(bp, EFSCORRUPTED); 375 xfs_buf_ioerror(bp, EFSCORRUPTED);
376 return;
376 } 377 }
377 xfs_btree_sblock_calc_crc(bp); 378 xfs_btree_sblock_calc_crc(bp);
378 379
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c
index c8fa5bbb36de..0028c50c1e2b 100644
--- a/fs/xfs/xfs_ialloc_btree.c
+++ b/fs/xfs/xfs_ialloc_btree.c
@@ -261,6 +261,7 @@ xfs_inobt_write_verify(
261 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, 261 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW,
262 bp->b_target->bt_mount, bp->b_addr); 262 bp->b_target->bt_mount, bp->b_addr);
263 xfs_buf_ioerror(bp, EFSCORRUPTED); 263 xfs_buf_ioerror(bp, EFSCORRUPTED);
264 return;
264 } 265 }
265 xfs_btree_sblock_calc_crc(bp); 266 xfs_btree_sblock_calc_crc(bp);
266 267