Btrfs: fix raid10 reading math
The btrfs-progs raid10 code has been silently reading the wrong raid10 block forever. We didn't notice because it was always fixed up by the retry code. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
6055e73604
commit
882895d411
|
@ -1170,8 +1170,6 @@ again:
|
||||||
multi->num_stripes = map->sub_stripes;
|
multi->num_stripes = map->sub_stripes;
|
||||||
else if (mirror_num)
|
else if (mirror_num)
|
||||||
stripe_index += mirror_num - 1;
|
stripe_index += mirror_num - 1;
|
||||||
else
|
|
||||||
stripe_index = stripe_nr % map->sub_stripes;
|
|
||||||
|
|
||||||
stripe_nr = stripe_nr / factor;
|
stripe_nr = stripe_nr / factor;
|
||||||
} else if (map->type & BTRFS_BLOCK_GROUP_DUP) {
|
} else if (map->type & BTRFS_BLOCK_GROUP_DUP) {
|
||||||
|
|
Loading…
Reference in New Issue