aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.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/volumes.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/volumes.c')
-rw-r--r--fs/btrfs/volumes.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 0b1e69d380d..3f4e70e171e 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -4610,28 +4610,6 @@ int btrfs_read_sys_array(struct btrfs_root *root)
4610 return ret; 4610 return ret;
4611} 4611}
4612 4612
4613struct btrfs_device *btrfs_find_device_for_logical(struct btrfs_root *root,
4614 u64 logical, int mirror_num)
4615{
4616 struct btrfs_mapping_tree *map_tree = &root->fs_info->mapping_tree;
4617 int ret;
4618 u64 map_length = 0;
4619 struct btrfs_bio *bbio = NULL;
4620 struct btrfs_device *device;
4621
4622 BUG_ON(mirror_num == 0);
4623 ret = btrfs_map_block(map_tree, WRITE, logical, &map_length, &bbio,
4624 mirror_num);
4625 if (ret) {
4626 BUG_ON(bbio != NULL);
4627 return NULL;
4628 }
4629 BUG_ON(mirror_num != bbio->mirror_num);
4630 device = bbio->stripes[mirror_num - 1].dev;
4631 kfree(bbio);
4632 return device;
4633}
4634
4635int btrfs_read_chunk_tree(struct btrfs_root *root) 4613int btrfs_read_chunk_tree(struct btrfs_root *root)
4636{ 4614{
4637 struct btrfs_path *path; 4615 struct btrfs_path *path;