Skip to content

Commit

Permalink
Btrfs: fix wrong mirror number tuning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miao Xie authored and Josef Bacik committed Jul 2, 2013
1 parent e6da5d2 commit a70c617
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/*
Expand Down

0 comments on commit a70c617

Please sign in to comment.