diff options
author | Andre Noll <maan@systemlinux.org> | 2008-07-21 17:05:22 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-07-21 17:05:22 +1000 |
commit | f233ea5c9e0d8b95e4283bf6a3436b88f6fd3586 (patch) | |
tree | 8a36b621de46da23f3957c6e3ea4d653c2937544 /drivers/md/raid0.c | |
parent | 15f4a5fdf3aa07b53f6a7969664741db5882e485 (diff) | |
download | linux-f233ea5c9e0d8b95e4283bf6a3436b88f6fd3586.tar.gz linux-f233ea5c9e0d8b95e4283bf6a3436b88f6fd3586.tar.bz2 linux-f233ea5c9e0d8b95e4283bf6a3436b88f6fd3586.zip |
md: Make mddev->array_size sector-based.
This patch renames the array_size field of struct mddev_s to array_sectors
and converts all instances to use units of 512 byte sectors instead of 1k
blocks.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
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 914c04ddec7c..2f30ebd8b7ab 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -293,16 +293,16 @@ static int raid0_run (mddev_t *mddev) goto out_free_conf; /* calculate array device size */ - mddev->array_size = 0; + mddev->array_sectors = 0; rdev_for_each(rdev, tmp, mddev) - mddev->array_size += rdev->size; + mddev->array_sectors += rdev->size * 2; printk("raid0 : md_size is %llu blocks.\n", - (unsigned long long)mddev->array_size); + (unsigned long long)mddev->array_sectors / 2); printk("raid0 : conf->hash_spacing is %llu blocks.\n", (unsigned long long)conf->hash_spacing); { - sector_t s = mddev->array_size; + sector_t s = mddev->array_sectors / 2; sector_t space = conf->hash_spacing; int round; conf->preshift = 0; |