diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index b9dfdfccdb78..1a637676a930 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -2594,7 +2594,7 @@ static int do_md_run(mddev_t * mddev) | |||
2594 | strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel)); | 2594 | strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel)); |
2595 | 2595 | ||
2596 | if (mddev->reshape_position != MaxSector && | 2596 | if (mddev->reshape_position != MaxSector && |
2597 | pers->reshape == NULL) { | 2597 | pers->start_reshape == NULL) { |
2598 | /* This personality cannot handle reshaping... */ | 2598 | /* This personality cannot handle reshaping... */ |
2599 | mddev->pers = NULL; | 2599 | mddev->pers = NULL; |
2600 | module_put(pers->owner); | 2600 | module_put(pers->owner); |
@@ -3556,14 +3556,16 @@ static int update_raid_disks(mddev_t *mddev, int raid_disks) | |||
3556 | { | 3556 | { |
3557 | int rv; | 3557 | int rv; |
3558 | /* change the number of raid disks */ | 3558 | /* change the number of raid disks */ |
3559 | if (mddev->pers->reshape == NULL) | 3559 | if (mddev->pers->check_reshape == NULL) |
3560 | return -EINVAL; | 3560 | return -EINVAL; |
3561 | if (raid_disks <= 0 || | 3561 | if (raid_disks <= 0 || |
3562 | raid_disks >= mddev->max_disks) | 3562 | raid_disks >= mddev->max_disks) |
3563 | return -EINVAL; | 3563 | return -EINVAL; |
3564 | if (mddev->sync_thread) | 3564 | if (mddev->sync_thread || mddev->reshape_position != MaxSector) |
3565 | return -EBUSY; | 3565 | return -EBUSY; |
3566 | rv = mddev->pers->reshape(mddev, raid_disks); | 3566 | mddev->delta_disks = raid_disks - mddev->raid_disks; |
3567 | |||
3568 | rv = mddev->pers->check_reshape(mddev); | ||
3567 | return rv; | 3569 | return rv; |
3568 | } | 3570 | } |
3569 | 3571 | ||