aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid5.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 36d5f8ac8265..fafc4bc045f7 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -98,7 +98,7 @@ static inline void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
98 list_add_tail(&sh->lru, &conf->inactive_list); 98 list_add_tail(&sh->lru, &conf->inactive_list);
99 atomic_dec(&conf->active_stripes); 99 atomic_dec(&conf->active_stripes);
100 if (!conf->inactive_blocked || 100 if (!conf->inactive_blocked ||
101 atomic_read(&conf->active_stripes) < (NR_STRIPES*3/4)) 101 atomic_read(&conf->active_stripes) < (conf->max_nr_stripes*3/4))
102 wake_up(&conf->wait_for_stripe); 102 wake_up(&conf->wait_for_stripe);
103 } 103 }
104 } 104 }
@@ -264,7 +264,8 @@ static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector
264 conf->inactive_blocked = 1; 264 conf->inactive_blocked = 1;
265 wait_event_lock_irq(conf->wait_for_stripe, 265 wait_event_lock_irq(conf->wait_for_stripe,
266 !list_empty(&conf->inactive_list) && 266 !list_empty(&conf->inactive_list) &&
267 (atomic_read(&conf->active_stripes) < (NR_STRIPES *3/4) 267 (atomic_read(&conf->active_stripes)
268 < (conf->max_nr_stripes *3/4)
268 || !conf->inactive_blocked), 269 || !conf->inactive_blocked),
269 conf->device_lock, 270 conf->device_lock,
270 unplug_slaves(conf->mddev); 271 unplug_slaves(conf->mddev);
@@ -1917,7 +1918,7 @@ static int run(mddev_t *mddev)
1917 goto abort; 1918 goto abort;
1918 } 1919 }
1919 } 1920 }
1920memory = conf->max_nr_stripes * (sizeof(struct stripe_head) + 1921 memory = conf->max_nr_stripes * (sizeof(struct stripe_head) +
1921 conf->raid_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024; 1922 conf->raid_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024;
1922 if (grow_stripes(conf, conf->max_nr_stripes)) { 1923 if (grow_stripes(conf, conf->max_nr_stripes)) {
1923 printk(KERN_ERR 1924 printk(KERN_ERR