Whamcloud - gitweb
Porting raid5 improvements to rhel5 kernels.
[fs/lustre-release.git] / lustre / kernel_patches / patches / raid5-large-io-rhel5.patch
1 diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c
2 --- linux-2.6.18-53.orig/drivers/md/raid5.c     2007-12-06 17:26:27.000000000 +0800
3 +++ linux-2.6.18-53/drivers/md/raid5.c  2007-12-06 17:26:55.000000000 +0800
4 @@ -3340,6 +3340,11 @@ static int run(mddev_t *mddev)
5         mddev->array_size =  mddev->size * (conf->previous_raid_disks -
6                                             conf->max_degraded);
7  
8 +       /* in order to support large I/Os */
9 +       blk_queue_max_sectors(mddev->queue, conf->chunk_size * conf->previous_raid_disks >> 9);
10 +       mddev->queue->max_phys_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;
11 +       mddev->queue->max_hw_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;;
12 +
13         return 0;
14  abort:
15         if (conf) {