Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48606a9f authored by NeilBrown's avatar NeilBrown
Browse files

md/raid5: correctly update sync_completed when we reach max_resync



At the end of reshape_request we update cyrr_resync_completed
if we are about to pause due to reaching resync_max.
However we update it to the wrong value.  We need to add the
"reshape_sectors" that have just been reshaped.

Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 7a3ab908
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3946,7 +3946,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
		wait_event(conf->wait_for_overlap,
		wait_event(conf->wait_for_overlap,
			   atomic_read(&conf->reshape_stripes) == 0);
			   atomic_read(&conf->reshape_stripes) == 0);
		mddev->reshape_position = conf->reshape_progress;
		mddev->reshape_position = conf->reshape_progress;
		mddev->curr_resync_completed = mddev->curr_resync;
		mddev->curr_resync_completed = mddev->curr_resync + reshape_sectors;
		conf->reshape_checkpoint = jiffies;
		conf->reshape_checkpoint = jiffies;
		set_bit(MD_CHANGE_DEVS, &mddev->flags);
		set_bit(MD_CHANGE_DEVS, &mddev->flags);
		md_wakeup_thread(mddev->thread);
		md_wakeup_thread(mddev->thread);