Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / raid5-configurable-cachesize-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:23:39.000000000 +0800
3 +++ linux-2.6.18-53/drivers/md/raid5.c  2007-12-06 17:24:14.000000000 +0800
4 @@ -57,7 +57,7 @@
5   * Stripe cache
6   */
7  
8 -#define NR_STRIPES             256
9 +static int raid5_nr_stripes = 256 * 8;
10  #define STRIPE_SIZE            PAGE_SIZE
11  #define STRIPE_SHIFT           (PAGE_SHIFT - 9)
12  #define STRIPE_SECTORS         (STRIPE_SIZE>>9)
13 @@ -3230,7 +3230,7 @@ static int run(mddev_t *mddev)
14         else
15                 conf->max_degraded = 1;
16         conf->algorithm = mddev->layout;
17 -       conf->max_nr_stripes = NR_STRIPES;
18 +       conf->max_nr_stripes = raid5_nr_stripes;
19         conf->expand_progress = mddev->reshape_position;
20  
21         /* device size must be a multiple of chunk size */
22 @@ -3821,6 +3821,7 @@ static void raid5_exit(void)
23  
24  module_init(raid5_init);
25  module_exit(raid5_exit);
26 +module_param(raid5_nr_stripes, int, 0644);
27  MODULE_LICENSE("GPL");
28  MODULE_ALIAS("md-personality-4"); /* RAID5 */
29  MODULE_ALIAS("md-raid5");
30 Only in linux-2.6.18-53/drivers/md: raid5.c.orig
31 Only in linux-2.6.18-53.orig/include/linux/raid: .raid5.h.swp