aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorLogan Gunthorpe2022-06-16 13:19:45 -0600
committerJens Axboe2022-08-02 17:14:43 -0600
commit9ad1a74ff0090fb201ee87ebb00b38c8bf25b26c (patch)
tree88b89bee7c79726ab5fd5c0229d33d89d50a773b /drivers/md/raid5.c
parentdf1b620a3e13b682f624c2cbf73e88d825d6d386 (diff)
md/raid5: Increase restriction on max segments per request
The block layer defaults the maximum segments to 128, which means requests tend to get split around the 512KB depending on how many pages can be merged. There's no such restriction in the raid5 code so increase the limit to USHRT_MAX so that larger requests can be sent as one. Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 651a84bf1a13..00cab9e525f1 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -8008,6 +8008,9 @@ static int raid5_run(struct mddev *mddev)
*/
blk_queue_max_hw_sectors(mddev->queue,
RAID5_MAX_REQ_STRIPES << RAID5_STRIPE_SHIFT(conf));
+
+ /* No restrictions on the number of segments in the request */
+ blk_queue_max_segments(mddev->queue, USHRT_MAX);
}
if (log_init(conf, journal_dev, raid5_has_ppl(conf)))