dm raid: fix rs_set_capacity on growing reshape
authorHeinz Mauelshagen <heinzm@redhat.com>
Thu, 23 Jun 2016 22:10:12 +0000 (00:10 +0200)
committerMike Snitzer <snitzer@redhat.com>
Mon, 18 Jul 2016 19:37:22 +0000 (15:37 -0400)
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c

index 62e31b47400c4a47a6cb60c83af43e5a5b15af9f..63883f4c550d9c762cb59a94ecad433dd8e28ff3 100644 (file)
@@ -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);
 }
 
 /*