diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index f013d3662665..4bbcb7e26d12 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -6384,12 +6384,18 @@ static int raid5_start_reshape(struct mddev *mddev) | |||
6384 | if (!mddev->sync_thread) { | 6384 | if (!mddev->sync_thread) { |
6385 | mddev->recovery = 0; | 6385 | mddev->recovery = 0; |
6386 | spin_lock_irq(&conf->device_lock); | 6386 | spin_lock_irq(&conf->device_lock); |
6387 | write_seqcount_begin(&conf->gen_lock); | ||
6387 | mddev->raid_disks = conf->raid_disks = conf->previous_raid_disks; | 6388 | mddev->raid_disks = conf->raid_disks = conf->previous_raid_disks; |
6389 | mddev->new_chunk_sectors = | ||
6390 | conf->chunk_sectors = conf->prev_chunk_sectors; | ||
6391 | mddev->new_layout = conf->algorithm = conf->prev_algo; | ||
6388 | rdev_for_each(rdev, mddev) | 6392 | rdev_for_each(rdev, mddev) |
6389 | rdev->new_data_offset = rdev->data_offset; | 6393 | rdev->new_data_offset = rdev->data_offset; |
6390 | smp_wmb(); | 6394 | smp_wmb(); |
6395 | conf->generation --; | ||
6391 | conf->reshape_progress = MaxSector; | 6396 | conf->reshape_progress = MaxSector; |
6392 | mddev->reshape_position = MaxSector; | 6397 | mddev->reshape_position = MaxSector; |
6398 | write_seqcount_end(&conf->gen_lock); | ||
6393 | spin_unlock_irq(&conf->device_lock); | 6399 | spin_unlock_irq(&conf->device_lock); |
6394 | return -EAGAIN; | 6400 | return -EAGAIN; |
6395 | } | 6401 | } |