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