aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorAndre Noll <maan@systemlinux.org>2009-03-30 23:33:13 -0400
committerNeilBrown <neilb@suse.de>2009-03-30 23:33:13 -0400
commitdd8ac336c13fd8afdb082ebacb1cddd5cf727889 (patch)
tree0baa8111d7406774525a1053be461135257d73d2 /drivers/md/linear.c
parent58c0fed400603a802968b23ddf78f029c5a84e41 (diff)
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.c4
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)
139 mddev->queue->max_sectors > (PAGE_SIZE>>9)) 139 mddev->queue->max_sectors > (PAGE_SIZE>>9))
140 blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); 140 blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
141 141
142 disk->num_sectors = rdev->size * 2; 142 disk->num_sectors = rdev->sectors;
143 conf->array_sectors += rdev->size * 2; 143 conf->array_sectors += rdev->sectors;
144 144
145 cnt++; 145 cnt++;
146 } 146 }