aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-03-30 23:59:03 -0400
committerDan Williams <dan.j.williams@intel.com>2009-03-30 23:59:03 -0400
commit1f403624bde3c678a166984b1e6a727a0ce06f2b (patch)
treeb66ed37091e825bcde1cd0d333d4ebba86772805 /drivers/md/linear.c
parent80c3a6ce4ba4470379b9e6a4d9bcd9d2ee26ae03 (diff)
md: centralize ->array_sectors modifications
Get personalities out of the business of directly modifying ->array_sectors. Lays groundwork to introduce policy on when ->array_sectors can be modified. Reviewed-by: Andre Noll <maan@systemlinux.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
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 b6bb976123da..7a36e38393a1 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -263,7 +263,7 @@ static int linear_run (mddev_t *mddev)
263 if (!conf) 263 if (!conf)
264 return 1; 264 return 1;
265 mddev->private = conf; 265 mddev->private = conf;
266 mddev->array_sectors = linear_size(mddev, 0, 0); 266 md_set_array_sectors(mddev, linear_size(mddev, 0, 0));
267 267
268 blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec); 268 blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec);
269 mddev->queue->unplug_fn = linear_unplug; 269 mddev->queue->unplug_fn = linear_unplug;
@@ -297,7 +297,7 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
297 newconf->prev = mddev_to_conf(mddev); 297 newconf->prev = mddev_to_conf(mddev);
298 mddev->private = newconf; 298 mddev->private = newconf;
299 mddev->raid_disks++; 299 mddev->raid_disks++;
300 mddev->array_sectors = linear_size(mddev, 0, 0); 300 md_set_array_sectors(mddev, linear_size(mddev, 0, 0));
301 set_capacity(mddev->gendisk, mddev->array_sectors); 301 set_capacity(mddev->gendisk, mddev->array_sectors);
302 return 0; 302 return 0;
303} 303}