summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2016-06-24 00:10:12 +0200
committerMike Snitzer <snitzer@redhat.com>2016-07-18 21:37:22 +0200
commit0095dbc98bfdcd5a3b6cda6d2dde70ae5ffefec7 (patch)
tree46e6690854809a7feec3c5bbb1e244905b2d7a14 /drivers/md/dm-raid.c
parentdm raid: make rs_set_capacity to work on shrinking reshape (diff)
downloadlinux-0095dbc98bfdcd5a3b6cda6d2dde70ae5ffefec7.tar.xz
linux-0095dbc98bfdcd5a3b6cda6d2dde70ae5ffefec7.zip
dm raid: fix rs_set_capacity on growing reshape
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r--drivers/md/dm-raid.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 62e31b47400c..63883f4c550d 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -616,13 +616,10 @@ static struct raid_type *get_raid_type_by_ll(const int level, const int layout)
static void rs_set_capacity(struct raid_set *rs)
{
struct mddev *mddev = &rs->md;
+ struct gendisk *gendisk = dm_disk(dm_table_get_md(rs->ti->table));
- if (rs->ti->len != mddev->array_sectors) {
- struct gendisk *gendisk = dm_disk(dm_table_get_md(rs->ti->table));
-
- set_capacity(gendisk, mddev->array_sectors);
- revalidate_disk(gendisk);
- }
+ set_capacity(gendisk, mddev->array_sectors);
+ revalidate_disk(gendisk);
}
/*