From: Shaohua Li Date: Thu, 8 Sep 2016 17:49:06 +0000 (-0700) Subject: raid5: allow arbitrary max_hw_sectors X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=fcd4a4cc13599a5dd56d2578ff32beba682628b2;p=deliverable%2Flinux.git raid5: allow arbitrary max_hw_sectors raid5 will split bio to proper size internally, there is no point to use underlayer disk's max_hw_sectors. In my qemu system, without the change, the raid5 only receives 128k size bio, which reduces the chance of bio merge sending to underlayer disks. Signed-off-by: Shaohua Li --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ee7fc3701700..5883ef0d95bf 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -7066,6 +7066,8 @@ static int raid5_run(struct mddev *mddev) else queue_flag_clear_unlocked(QUEUE_FLAG_DISCARD, mddev->queue); + + blk_queue_max_hw_sectors(mddev->queue, UINT_MAX); } if (journal_dev) {