summaryrefslogtreecommitdiff
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorJody McIntyre <scjody@modernduck.com>2005-12-13 07:34:32 +0300
committerJody McIntyre <scjody@modernduck.com>2005-12-13 07:34:32 +0300
commit525352eb6d355bef6adf597252fc6d04f2dbe66c (patch)
tree4d2b42372ec0ac985f2775b0ea260c707e93fdd4 /drivers/md/raid5.c
parentd51e86c18a479f1dbcef3aa20e58ad04d1233016 (diff)
parent0e670506668a43e1355b8f10c33d081a676bd521 (diff)
downloadlinux-525352eb6d355bef6adf597252fc6d04f2dbe66c.tar.xz
Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/md/raid5.c')
-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)
list_add_tail(&sh->lru, &conf->inactive_list);
atomic_dec(&conf->active_stripes);
if (!conf->inactive_blocked ||
- atomic_read(&conf->active_stripes) < (NR_STRIPES*3/4))
+ atomic_read(&conf->active_stripes) < (conf->max_nr_stripes*3/4))
wake_up(&conf->wait_for_stripe);
}
}
@@ -264,7 +264,8 @@ static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector
conf->inactive_blocked = 1;
wait_event_lock_irq(conf->wait_for_stripe,
!list_empty(&conf->inactive_list) &&
- (atomic_read(&conf->active_stripes) < (NR_STRIPES *3/4)
+ (atomic_read(&conf->active_stripes)
+ < (conf->max_nr_stripes *3/4)
|| !conf->inactive_blocked),
conf->device_lock,
unplug_slaves(conf->mddev);
@@ -1917,7 +1918,7 @@ static int run(mddev_t *mddev)
goto abort;
}
}
-memory = conf->max_nr_stripes * (sizeof(struct stripe_head) +
+ memory = conf->max_nr_stripes * (sizeof(struct stripe_head) +
conf->raid_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024;
if (grow_stripes(conf, conf->max_nr_stripes)) {
printk(KERN_ERR