summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorMiao Xie2013-06-19 12:20:17 +0200
committerJosef Bacik2013-07-02 17:50:50 +0200
commita70c6172e714c70439b8321a201635f56a178913 (patch)
tree29dba6f425efa0c349a1aa3b43c296d3eac8e427 /fs/btrfs/volumes.c
parentBtrfs: cleanup redundant code in btrfs_submit_direct() (diff)
downloadkernel-qcow2-linux-a70c6172e714c70439b8321a201635f56a178913.tar.gz
kernel-qcow2-linux-a70c6172e714c70439b8321a201635f56a178913.tar.xz
kernel-qcow2-linux-a70c6172e714c70439b8321a201635f56a178913.zip
Btrfs: fix wrong mirror number tuning
Now reading the data from the target device of the replace operation is allowed, so the mirror number that is greater than the stripes number of a chunk is valid, we will tune it when we find there is no target device later. Fix it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index c58bf19a8a48..7789598eeb75 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -4420,9 +4420,6 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
map = (struct map_lookup *)em->bdev;
offset = logical - em->start;
- if (mirror_num > map->num_stripes)
- mirror_num = 0;
-
stripe_len = map->stripe_len;
stripe_nr = offset;
/*