summaryrefslogtreecommitdiff
path: root/fs/btrfs/scrub.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2012-03-30 13:58:31 +0200
committerDavid Sterba <dsterba@suse.cz>2012-04-18 19:22:36 +0200
commit5c84fc3c3914e9adfa6155a167c6c0c2709e6a62 (patch)
treeb2ef30b7872dc9f31f621681169abaf4eb9e8205 /fs/btrfs/scrub.c
parent99ba55ad696944b37d5557bc5b4816890854fdb9 (diff)
Btrfs: don't count CRC or header errors twice while scrubbing
Each CRC or header error was counted twice, this is now fixed. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r--fs/btrfs/scrub.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 60f0e28db31e..b679bf68861e 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -1258,12 +1258,6 @@ static int scrub_checksum_data(struct scrub_block *sblock)
if (memcmp(csum, on_disk_csum, sdev->csum_size))
fail = 1;
- if (fail) {
- spin_lock(&sdev->stat_lock);
- ++sdev->stat.csum_errors;
- spin_unlock(&sdev->stat_lock);
- }
-
return fail;
}
@@ -1336,15 +1330,6 @@ static int scrub_checksum_tree_block(struct scrub_block *sblock)
if (memcmp(calculated_csum, on_disk_csum, sdev->csum_size))
++crc_fail;
- if (crc_fail || fail) {
- spin_lock(&sdev->stat_lock);
- if (crc_fail)
- ++sdev->stat.csum_errors;
- if (fail)
- ++sdev->stat.verify_errors;
- spin_unlock(&sdev->stat_lock);
- }
-
return fail || crc_fail;
}