Loading drivers/md/linear.c +7 −5 Original line number Diff line number Diff line Loading @@ -172,12 +172,14 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit max_segments to 1 lying within * a single page. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } conf->array_sectors += rdev->sectors; cnt++; Loading drivers/md/multipath.c +12 −8 Original line number Diff line number Diff line Loading @@ -301,14 +301,16 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit ->max_segments to one, lying * within a single page. * (Note: it is very unlikely that a device with * merge_bvec_fn will be involved in multipath.) */ if (q->merge_bvec_fn && queue_max_sectors(q) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (q->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } conf->working_disks++; mddev->degraded--; Loading Loading @@ -476,9 +478,11 @@ static int multipath_run (mddev_t *mddev) /* as we don't honour merge_bvec_fn, we must never risk * violating it, not that we ever expect a device with * a merge_bvec_fn to be involved in multipath */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } if (!test_bit(Faulty, &rdev->flags)) conf->working_disks++; Loading drivers/md/raid0.c +7 −6 Original line number Diff line number Diff line Loading @@ -176,14 +176,15 @@ static int create_strip_zones(mddev_t *mddev) disk_stack_limits(mddev->gendisk, rdev1->bdev, rdev1->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit ->max_segments to 1, lying within * a single page. */ if (rdev1->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev1->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } if (!smallest || (rdev1->sectors < smallest->sectors)) smallest = rdev1; cnt++; Loading drivers/md/raid1.c +17 −11 Original line number Diff line number Diff line Loading @@ -1152,13 +1152,17 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. /* as we don't honour merge_bvec_fn, we must * never risk violating it, so limit * ->max_segments to one lying with a single * page, as a one page request is never in * violation. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } p->head_position = 0; rdev->raid_disk = mirror; Loading Loading @@ -2098,12 +2102,14 @@ static int run(mddev_t *mddev) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit ->max_segments to 1 lying within * a single page, as a one page request is never in violation. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } } mddev->degraded = 0; Loading drivers/md/raid10.c +17 −11 Original line number Diff line number Diff line Loading @@ -1155,13 +1155,17 @@ static int raid10_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. /* as we don't honour merge_bvec_fn, we must * never risk violating it, so limit * ->max_segments to one lying with a single * page, as a one page request is never in * violation. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } p->head_position = 0; rdev->raid_disk = mirror; Loading Loading @@ -2255,12 +2259,14 @@ static int run(mddev_t *mddev) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit max_segments to 1 lying * within a single page. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } disk->head_position = 0; } Loading Loading
drivers/md/linear.c +7 −5 Original line number Diff line number Diff line Loading @@ -172,12 +172,14 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit max_segments to 1 lying within * a single page. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } conf->array_sectors += rdev->sectors; cnt++; Loading
drivers/md/multipath.c +12 −8 Original line number Diff line number Diff line Loading @@ -301,14 +301,16 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit ->max_segments to one, lying * within a single page. * (Note: it is very unlikely that a device with * merge_bvec_fn will be involved in multipath.) */ if (q->merge_bvec_fn && queue_max_sectors(q) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (q->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } conf->working_disks++; mddev->degraded--; Loading Loading @@ -476,9 +478,11 @@ static int multipath_run (mddev_t *mddev) /* as we don't honour merge_bvec_fn, we must never risk * violating it, not that we ever expect a device with * a merge_bvec_fn to be involved in multipath */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } if (!test_bit(Faulty, &rdev->flags)) conf->working_disks++; Loading
drivers/md/raid0.c +7 −6 Original line number Diff line number Diff line Loading @@ -176,14 +176,15 @@ static int create_strip_zones(mddev_t *mddev) disk_stack_limits(mddev->gendisk, rdev1->bdev, rdev1->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit ->max_segments to 1, lying within * a single page. */ if (rdev1->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev1->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } if (!smallest || (rdev1->sectors < smallest->sectors)) smallest = rdev1; cnt++; Loading
drivers/md/raid1.c +17 −11 Original line number Diff line number Diff line Loading @@ -1152,13 +1152,17 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. /* as we don't honour merge_bvec_fn, we must * never risk violating it, so limit * ->max_segments to one lying with a single * page, as a one page request is never in * violation. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } p->head_position = 0; rdev->raid_disk = mirror; Loading Loading @@ -2098,12 +2102,14 @@ static int run(mddev_t *mddev) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit ->max_segments to 1 lying within * a single page, as a one page request is never in violation. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } } mddev->degraded = 0; Loading
drivers/md/raid10.c +17 −11 Original line number Diff line number Diff line Loading @@ -1155,13 +1155,17 @@ static int raid10_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. /* as we don't honour merge_bvec_fn, we must * never risk violating it, so limit * ->max_segments to one lying with a single * page, as a one page request is never in * violation. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } p->head_position = 0; rdev->raid_disk = mirror; Loading Loading @@ -2255,12 +2259,14 @@ static int run(mddev_t *mddev) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. * violating it, so limit max_segments to 1 lying * within a single page. */ if (rdev->bdev->bd_disk->queue->merge_bvec_fn && queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); if (rdev->bdev->bd_disk->queue->merge_bvec_fn) { blk_queue_max_segments(mddev->queue, 1); blk_queue_segment_boundary(mddev->queue, PAGE_CACHE_SIZE - 1); } disk->head_position = 0; } Loading