aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.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/raid1.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/raid1.c')
-rw-r--r--drivers/md/raid1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index a2a83b0d5a95..044116b53f7a 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2059,7 +2059,7 @@ static int run(mddev_t *mddev)
2059 /* 2059 /*
2060 * Ok, everything is just fine now 2060 * Ok, everything is just fine now
2061 */ 2061 */
2062 mddev->array_sectors = raid1_size(mddev, 0, 0); 2062 md_set_array_sectors(mddev, raid1_size(mddev, 0, 0));
2063 2063
2064 mddev->queue->unplug_fn = raid1_unplug; 2064 mddev->queue->unplug_fn = raid1_unplug;
2065 mddev->queue->backing_dev_info.congested_fn = raid1_congested; 2065 mddev->queue->backing_dev_info.congested_fn = raid1_congested;
@@ -2124,7 +2124,7 @@ static int raid1_resize(mddev_t *mddev, sector_t sectors)
2124 * any io in the removed space completes, but it hardly seems 2124 * any io in the removed space completes, but it hardly seems
2125 * worth it. 2125 * worth it.
2126 */ 2126 */
2127 mddev->array_sectors = raid1_size(mddev, sectors, 0); 2127 md_set_array_sectors(mddev, raid1_size(mddev, sectors, 0));
2128 set_capacity(mddev->gendisk, mddev->array_sectors); 2128 set_capacity(mddev->gendisk, mddev->array_sectors);
2129 mddev->changed = 1; 2129 mddev->changed = 1;
2130 if (mddev->array_sectors > mddev->dev_sectors && 2130 if (mddev->array_sectors > mddev->dev_sectors &&