aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2012-08-27 10:30:03 -0400
committerChris Mason <chris.mason@oracle.com>2012-08-28 16:53:39 -0400
commit5ee0844d6427e7338e0aba748f62b62d07ea2ed0 (patch)
tree27980140d38e5158d64f24a5027beb46b52bc476 /fs/btrfs/extent_io.c
parent68ce9682a4bb95d6be5529cb57214bf2a1b7d20e (diff)
Btrfs: revert checksum error statistic which can cause a BUG()
Commit 442a4f6308e694e0fa6025708bd5e4e424bbf51c added btrfs device statistic counters for detected IO and checksum errors to Linux 3.5. The statistic part that counts checksum errors in end_bio_extent_readpage() can cause a BUG() in a subfunction: "kernel BUG at fs/btrfs/volumes.c:3762!" That part is reverted with the current patch. However, the counting of checksum errors in the scrub context remains active, and the counting of detected IO errors (read, write or flush errors) in all contexts remains active. Cc: stable <stable@vger.kernel.org> # 3.5 Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 3e7c9ed6505b..49085f2336d2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2329,23 +2329,10 @@ static void end_bio_extent_readpage(struct bio *bio, int err)
2329 if (uptodate && tree->ops && tree->ops->readpage_end_io_hook) { 2329 if (uptodate && tree->ops && tree->ops->readpage_end_io_hook) {
2330 ret = tree->ops->readpage_end_io_hook(page, start, end, 2330 ret = tree->ops->readpage_end_io_hook(page, start, end,
2331 state, mirror); 2331 state, mirror);
2332 if (ret) { 2332 if (ret)
2333 /* no IO indicated but software detected errors
2334 * in the block, either checksum errors or
2335 * issues with the contents */
2336 struct btrfs_root *root =
2337 BTRFS_I(page->mapping->host)->root;
2338 struct btrfs_device *device;
2339
2340 uptodate = 0; 2333 uptodate = 0;
2341 device = btrfs_find_device_for_logical( 2334 else
2342 root, start, mirror);
2343 if (device)
2344 btrfs_dev_stat_inc_and_print(device,
2345 BTRFS_DEV_STAT_CORRUPTION_ERRS);
2346 } else {
2347 clean_io_failure(start, page); 2335 clean_io_failure(start, page);
2348 }
2349 } 2336 }
2350 2337
2351 if (!uptodate && tree->ops && tree->ops->readpage_io_failed_hook) { 2338 if (!uptodate && tree->ops && tree->ops->readpage_io_failed_hook) {