| To: | Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH 2/6] xfs: skip pointless CRC updates after verifier failures |
| From: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
| Date: | Sun, 09 Feb 2014 20:24:09 -0600 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <52F83630.4020008@xxxxxxxxxx> |
| References: | <52F83630.4020008@xxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
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@xxxxxxxxxx>
---
fs/xfs/xfs_alloc_btree.c | 1 +
fs/xfs/xfs_ialloc_btree.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c
index 1308542..144d3b0 100644
--- a/fs/xfs/xfs_alloc_btree.c
+++ b/fs/xfs/xfs_alloc_btree.c
@@ -373,6 +373,7 @@ xfs_allocbt_write_verify(
XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW,
bp->b_target->bt_mount, bp->b_addr);
xfs_buf_ioerror(bp, EFSCORRUPTED);
+ return;
}
xfs_btree_sblock_calc_crc(bp);
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c
index c8fa5bb..0028c50 100644
--- a/fs/xfs/xfs_ialloc_btree.c
+++ b/fs/xfs/xfs_ialloc_btree.c
@@ -261,6 +261,7 @@ xfs_inobt_write_verify(
XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW,
bp->b_target->bt_mount, bp->b_addr);
xfs_buf_ioerror(bp, EFSCORRUPTED);
+ return;
}
xfs_btree_sblock_calc_crc(bp);
-- 1.7.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 1/6] xfs: limit superblock corruption errors to actual corruption, Eric Sandeen |
|---|---|
| Next by Date: | [PATCH 3/6] xfs: add helper for verifying checksums on xfs_bufs, Eric Sandeen |
| Previous by Thread: | [PATCH 1/6] xfs: limit superblock corruption errors to actual corruption, Eric Sandeen |
| Next by Thread: | [PATCH 3/6] xfs: add helper for verifying checksums on xfs_bufs, Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |