1 --- linux-2.6.9.orig/drivers/md/raid6main.c 2006-09-07 23:10:43.000000000 +0800
2 +++ linux-2.6.9/drivers/md/raid6main.c 2006-09-07 23:11:25.000000000 +0800
7 -#define NR_STRIPES 256
8 +static int raid6_nr_stripes = 256 * 8;
9 #define STRIPE_SIZE PAGE_SIZE
10 #define STRIPE_SHIFT (PAGE_SHIFT - 9)
11 #define STRIPE_SECTORS (STRIPE_SIZE>>9)
12 @@ -111,7 +111,7 @@ static inline void __release_stripe(raid
13 list_add_tail(&sh->lru, &conf->inactive_list);
14 atomic_dec(&conf->active_stripes);
15 if (!conf->inactive_blocked ||
16 - atomic_read(&conf->active_stripes) < (NR_STRIPES*3/4))
17 + atomic_read(&conf->active_stripes) < (raid6_nr_stripes*3/4))
18 wake_up(&conf->wait_for_stripe);
21 @@ -274,7 +274,7 @@ static struct stripe_head *get_active_st
22 conf->inactive_blocked = 1;
23 wait_event_lock_irq(conf->wait_for_stripe,
24 !list_empty(&conf->inactive_list) &&
25 - (atomic_read(&conf->active_stripes) < (NR_STRIPES *3/4)
26 + (atomic_read(&conf->active_stripes) < (raid6_nr_stripes *3/4)
27 || !conf->inactive_blocked),
29 unplug_slaves(conf->mddev);
30 @@ -1805,7 +1805,7 @@ static int run (mddev_t *mddev)
31 conf->chunk_size = mddev->chunk_size;
32 conf->level = mddev->level;
33 conf->algorithm = mddev->layout;
34 - conf->max_nr_stripes = NR_STRIPES;
35 + conf->max_nr_stripes = raid6_nr_stripes;
37 /* device size must be a multiple of chunk size */
38 mddev->size &= ~(mddev->chunk_size/1024 -1);
39 @@ -2139,5 +2139,6 @@ static void raid6_exit (void)
41 module_init(raid6_init);
42 module_exit(raid6_exit);
43 +module_param(raid6_nr_stripes, int, 0644);
44 MODULE_LICENSE("GPL");
45 MODULE_ALIAS("md-personality-8"); /* RAID6 */