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>
This commit is contained in:
Heinz Mauelshagen 2016-06-24 00:10:12 +02:00 committed by Mike Snitzer
parent 9d9d939c80
commit 0095dbc98b
1 changed files with 3 additions and 6 deletions

View 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);
}
/*