Btrfs: fix repair code for RAID10
authorJan Schmidt <list.btrfs@jan-o-sch.net>
Fri, 27 Apr 2012 16:41:45 +0000 (12:41 -0400)
committerVarun Wadekar <vwadekar@nvidia.com>
Mon, 30 Apr 2012 12:37:03 +0000 (17:37 +0530)
commit90048398dc1685aacc3232bfcf7713dcd49a315e
tree5f8480f6f1960b3e808dc7390213aa59c902f318
parenta0720e65a6bad1b444c51553acbf822af8c65a26
Btrfs: fix repair code for RAID10

btrfs_map_block sets mirror_num, so that the repair code knows eventually
which device gave us the read error. For RAID10, mirror_num must be 1 or 2.
Before this fix mirror_num was incorrectly related to our stripe index.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/volumes.c