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/linear.c | |
parent | 15f4a5fdf3aa07b53f6a7969664741db5882e485 (diff) | |
download | talos-op-linux-f233ea5c9e0d8b95e4283bf6a3436b88f6fd3586.tar.gz talos-op-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/linear.c')
-rw-r--r-- | drivers/md/linear.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index ec921f58fbb8..57644a780f16 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c @@ -256,7 +256,7 @@ static int linear_run (mddev_t *mddev) if (!conf) return 1; mddev->private = conf; - mddev->array_size = conf->array_size; + mddev->array_sectors = conf->array_size * 2; blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec); mddev->queue->unplug_fn = linear_unplug; @@ -290,8 +290,8 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) newconf->prev = mddev_to_conf(mddev); mddev->private = newconf; mddev->raid_disks++; - mddev->array_size = newconf->array_size; - set_capacity(mddev->gendisk, mddev->array_size << 1); + mddev->array_sectors = newconf->array_size * 2; + set_capacity(mddev->gendisk, mddev->array_sectors); return 0; } |