aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
331 goto out_free_conf; 331 goto out_free_conf;
332 size = conf->strip_zone[cur].size; 332 size = conf->strip_zone[cur].size;
333 333
334 for (i=0; i< nb_zone; i++) { 334 conf->hash_table[0] = conf->strip_zone + cur;
335 conf->hash_table[i] = conf->strip_zone + cur; 335 for (i=1; i< nb_zone; i++) {
336 while (size <= conf->hash_spacing) { 336 while (size <= conf->hash_spacing) {
337 cur++; 337 cur++;
338 size += conf->strip_zone[cur].size; 338 size += conf->strip_zone[cur].size;
339 } 339 }
340 size -= conf->hash_spacing; 340 size -= conf->hash_spacing;
341 conf->hash_table[i] = conf->strip_zone + cur;
341 } 342 }
342 if (conf->preshift) { 343 if (conf->preshift) {
343 conf->hash_spacing >>= conf->preshift; 344 conf->hash_spacing >>= conf->preshift;