diff --git a/[refs] b/[refs] index 8dbf5327d67f..a8e65ef3547a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 996d282c7ff470f150a467eb4815b90159d04c47 +refs/heads/master: 3e74317ad773ba9df36db1fa32848cba41ac4d1a diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index 3b984173d25b..1411b99555a4 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -3807,10 +3807,11 @@ static int __btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, else if (mirror_num) stripe_index += mirror_num - 1; else { + int old_stripe_index = stripe_index; stripe_index = find_live_mirror(map, stripe_index, map->sub_stripes, stripe_index + current->pid % map->sub_stripes); - mirror_num = stripe_index + 1; + mirror_num = stripe_index - old_stripe_index + 1; } } else { /*