diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/volumes.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 04ca48362ef1..765aabd9145f 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -5773,20 +5773,17 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, | |||
5773 | } | 5773 | } |
5774 | } | 5774 | } |
5775 | if (found) { | 5775 | if (found) { |
5776 | if (physical_of_found + map->stripe_len <= | 5776 | struct btrfs_bio_stripe *tgtdev_stripe = |
5777 | dev_replace->cursor_left) { | 5777 | bbio->stripes + num_stripes; |
5778 | struct btrfs_bio_stripe *tgtdev_stripe = | ||
5779 | bbio->stripes + num_stripes; | ||
5780 | 5778 | ||
5781 | tgtdev_stripe->physical = physical_of_found; | 5779 | tgtdev_stripe->physical = physical_of_found; |
5782 | tgtdev_stripe->length = | 5780 | tgtdev_stripe->length = |
5783 | bbio->stripes[index_srcdev].length; | 5781 | bbio->stripes[index_srcdev].length; |
5784 | tgtdev_stripe->dev = dev_replace->tgtdev; | 5782 | tgtdev_stripe->dev = dev_replace->tgtdev; |
5785 | bbio->tgtdev_map[index_srcdev] = num_stripes; | 5783 | bbio->tgtdev_map[index_srcdev] = num_stripes; |
5786 | 5784 | ||
5787 | tgtdev_indexes++; | 5785 | tgtdev_indexes++; |
5788 | num_stripes++; | 5786 | num_stripes++; |
5789 | } | ||
5790 | } | 5787 | } |
5791 | } | 5788 | } |
5792 | 5789 | ||