|
@@ -6068,7 +6068,8 @@ int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio,
|
|
bbio->fs_info = root->fs_info;
|
|
bbio->fs_info = root->fs_info;
|
|
atomic_set(&bbio->stripes_pending, bbio->num_stripes);
|
|
atomic_set(&bbio->stripes_pending, bbio->num_stripes);
|
|
|
|
|
|
- if (bbio->raid_map) {
|
|
|
|
|
|
+ if ((bbio->map_type & BTRFS_BLOCK_GROUP_RAID56_MASK) &&
|
|
|
|
+ ((rw & WRITE) || (mirror_num > 1))) {
|
|
/* In this case, map_length has been set to the length of
|
|
/* In this case, map_length has been set to the length of
|
|
a single stripe; not the whole write */
|
|
a single stripe; not the whole write */
|
|
if (rw & WRITE) {
|
|
if (rw & WRITE) {
|