summaryrefslogtreecommitdiffstats
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-08-03 02:59:58 +0200
committerNeilBrown <neilb@suse.de>2009-08-03 02:59:58 +0200
commit449aad3e25358812c43afc60918c5ad3819488e7 (patch)
tree45fab3b82fc1ed06959537a0801319045cf4c102 /drivers/md/linear.c
parentmd: allow raid5_quiesce to work properly when reshape is happening. (diff)
downloadlinux-449aad3e25358812c43afc60918c5ad3819488e7.tar.xz
linux-449aad3e25358812c43afc60918c5ad3819488e7.zip
md: Use revalidate_disk to effect changes in size of device.
As revalidate_disk calls check_disk_size_change, it will cause any capacity change of a gendisk to be propagated to the blockdev inode. So use that instead of mucking about with locks and i_size_write. Also add a call to revalidate_disk in do_md_run and a few other places where the gendisk capacity is changed. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r--drivers/md/linear.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 54c8677f1e59..5fe39c2a3d2b 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -257,6 +257,7 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
rcu_assign_pointer(mddev->private, newconf);
md_set_array_sectors(mddev, linear_size(mddev, 0, 0));
set_capacity(mddev->gendisk, mddev->array_sectors);
+ revalidate_disk(mddev->gendisk);
call_rcu(&oldconf->rcu, free_conf);
return 0;
}