diff options
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 77605cdceaf1..41ee9deed250 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -176,14 +176,15 @@ static int create_strip_zones(mddev_t *mddev) | |||
176 | disk_stack_limits(mddev->gendisk, rdev1->bdev, | 176 | disk_stack_limits(mddev->gendisk, rdev1->bdev, |
177 | rdev1->data_offset << 9); | 177 | rdev1->data_offset << 9); |
178 | /* as we don't honour merge_bvec_fn, we must never risk | 178 | /* as we don't honour merge_bvec_fn, we must never risk |
179 | * violating it, so limit ->max_sector to one PAGE, as | 179 | * violating it, so limit ->max_phys_segments to 1, lying within |
180 | * a one page request is never in violation. | 180 | * a single page. |
181 | */ | 181 | */ |
182 | 182 | ||
183 | if (rdev1->bdev->bd_disk->queue->merge_bvec_fn && | 183 | if (rdev1->bdev->bd_disk->queue->merge_bvec_fn) { |
184 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) | 184 | blk_queue_max_phys_segments(mddev->queue, 1); |
185 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 185 | blk_queue_segment_boundary(mddev->queue, |
186 | 186 | PAGE_CACHE_SIZE - 1); | |
187 | } | ||
187 | if (!smallest || (rdev1->sectors < smallest->sectors)) | 188 | if (!smallest || (rdev1->sectors < smallest->sectors)) |
188 | smallest = rdev1; | 189 | smallest = rdev1; |
189 | cnt++; | 190 | cnt++; |