diff options
author | Andre Noll <maan@systemlinux.org> | 2009-03-31 14:33:13 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-03-31 14:33:13 +1100 |
commit | dd8ac336c13fd8afdb082ebacb1cddd5cf727889 (patch) | |
tree | 0baa8111d7406774525a1053be461135257d73d2 /drivers/md/linear.c | |
parent | 58c0fed400603a802968b23ddf78f029c5a84e41 (diff) | |
download | lwn-dd8ac336c13fd8afdb082ebacb1cddd5cf727889.tar.gz lwn-dd8ac336c13fd8afdb082ebacb1cddd5cf727889.zip |
md: Represent raid device size in sectors.
This patch renames the "size" field of struct mdk_rdev_s to
"sectors" and changes this field to store sectors instead of
blocks.
All users of this field, linear.c, raid0.c and md.c, are fixed up
accordingly which gets rid of many multiplications and divisions.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index f2488343ed4a..d5d99290041a 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c @@ -139,8 +139,8 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) mddev->queue->max_sectors > (PAGE_SIZE>>9)) blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); - disk->num_sectors = rdev->size * 2; - conf->array_sectors += rdev->size * 2; + disk->num_sectors = rdev->sectors; + conf->array_sectors += rdev->sectors; cnt++; } |