diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-05-23 17:20:58 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-05-23 17:20:58 -0400 |
commit | 9528454f9c02fb9c359c4c42c69eed4d47407e39 (patch) | |
tree | 40e8c7f829b528073d2b216c3b8e6be205c76245 /drivers/md | |
parent | 777e1d4a0f3387933f668e7adc81384827975189 (diff) | |
parent | 1faadface9c5d000bb16e42c89f24859337cf2db (diff) | |
download | linux-9528454f9c02fb9c359c4c42c69eed4d47407e39.tar.bz2 |
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 2 | ||||
-rw-r--r-- | drivers/md/raid0.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index d7316b829a62..3ca3cfb03a7e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2252,7 +2252,7 @@ action_store(mddev_t *mddev, const char *page, size_t len) } else { if (cmd_match(page, "check")) set_bit(MD_RECOVERY_CHECK, &mddev->recovery); - else if (cmd_match(page, "repair")) + else if (!cmd_match(page, "repair")) return -EINVAL; set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery); set_bit(MD_RECOVERY_SYNC, &mddev->recovery); 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; |