X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmd%2Fraid0.c;h=cb8c6317e4e5fc367c7098a87e310b5ed059f724;hb=55b4d6a52195a8f277ffddf755ddaff359878f41;hp=678f4dbbea1d5c22082d13fb1afd321465b61f28;hpb=3cfc15103aa56c2c7ee6dd312c24a8d1697bade1;p=linux-2.6-omap-h63xx.git diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 678f4dbbea1..cb8c6317e4e 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;