aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 914c04ddec7c..2f30ebd8b7ab 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -293,16 +293,16 @@ static int raid0_run (mddev_t *mddev)
293 goto out_free_conf; 293 goto out_free_conf;
294 294
295 /* calculate array device size */ 295 /* calculate array device size */
296 mddev->array_size = 0; 296 mddev->array_sectors = 0;
297 rdev_for_each(rdev, tmp, mddev) 297 rdev_for_each(rdev, tmp, mddev)
298 mddev->array_size += rdev->size; 298 mddev->array_sectors += rdev->size * 2;
299 299
300 printk("raid0 : md_size is %llu blocks.\n", 300 printk("raid0 : md_size is %llu blocks.\n",
301 (unsigned long long)mddev->array_size); 301 (unsigned long long)mddev->array_sectors / 2);
302 printk("raid0 : conf->hash_spacing is %llu blocks.\n", 302 printk("raid0 : conf->hash_spacing is %llu blocks.\n",
303 (unsigned long long)conf->hash_spacing); 303 (unsigned long long)conf->hash_spacing);
304 { 304 {
305 sector_t s = mddev->array_size; 305 sector_t s = mddev->array_sectors / 2;
306 sector_t space = conf->hash_spacing; 306 sector_t space = conf->hash_spacing;
307 int round; 307 int round;
308 conf->preshift = 0; 308 conf->preshift = 0;