summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2017-02-24 04:15:23 +0100
committerShaohua Li <shli@fb.com>2017-03-09 18:02:18 +0100
commitc94836342192b05d599d6aa3397f732f7a238689 (patch)
tree17c6407285ffbc1e1c75302b66338b84bb592831 /drivers/md/raid1.c
parentmd-cluster: remove useless memset from gather_all_resync_info (diff)
downloadlinux-c94836342192b05d599d6aa3397f732f7a238689.tar.xz
linux-c94836342192b05d599d6aa3397f732f7a238689.zip
md: move funcs from pers->resize to update_size
raid1_resize and raid5_resize should also check the mddev->queue if run underneath dm-raid. And both set_capacity and revalidate_disk are used in pers->resize such as raid1, raid10 and raid5. So move them from personality file to common code. Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index fbc2d7851b49..10c3865e1186 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -3246,8 +3246,6 @@ static int raid1_resize(struct mddev *mddev, sector_t sectors)
return ret;
}
md_set_array_sectors(mddev, newsize);
- set_capacity(mddev->gendisk, mddev->array_sectors);
- revalidate_disk(mddev->gendisk);
if (sectors > mddev->dev_sectors &&
mddev->recovery_cp > mddev->dev_sectors) {
mddev->recovery_cp = mddev->dev_sectors;