md/raid5: make sure curr_sync_completes is uptodate when reshape starts

This value is visible through sysfs and is used by mdadm
when it manages a reshape (backing up data that is about to be
rearranged). So it is important that it is always correct.
Current it does not get updated properly when a reshape
starts which can cause problems when assembling an array
that is in the middle of being reshaped.

This is suitable for 2.6.31.y stable kernels.

Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>

NeilBrown 8dee7211 24395a85

+2
+2
drivers/md/raid5.c
··· 4049 4049 sector_nr = conf->reshape_progress; 4050 4050 sector_div(sector_nr, new_data_disks); 4051 4051 if (sector_nr) { 4052 + mddev->curr_resync_completed = sector_nr; 4053 + sysfs_notify(&mddev->kobj, NULL, "sync_completed"); 4052 4054 *skipped = 1; 4053 4055 return sector_nr; 4054 4056 }