summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 20:47:26 +0200
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 20:47:26 +0200
commitf0cd91a68acdc9b49d7f6738b514a426da627649 (patch)
tree8ad73564015794197583b094217ae0a71e71e753 /drivers/md/raid0.c
parent[SCSI] spi transport: don't allow dt to be set on SE or HVD buses (diff)
parentMerge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/... (diff)
downloadlinux-f0cd91a68acdc9b49d7f6738b514a426da627649.tar.xz
linux-f0cd91a68acdc9b49d7f6738b514a426da627649.zip
Merge ../linux-2.6
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 678f4dbbea1d..cb8c6317e4e5 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -331,13 +331,14 @@ static int raid0_run (mddev_t *mddev)
goto out_free_conf;
size = conf->strip_zone[cur].size;
- for (i=0; i< nb_zone; i++) {
- conf->hash_table[i] = conf->strip_zone + cur;
+ conf->hash_table[0] = conf->strip_zone + cur;
+ for (i=1; i< nb_zone; i++) {
while (size <= conf->hash_spacing) {
cur++;
size += conf->strip_zone[cur].size;
}
size -= conf->hash_spacing;
+ conf->hash_table[i] = conf->strip_zone + cur;
}
if (conf->preshift) {
conf->hash_spacing >>= conf->preshift;