NeilBrown db0505d320 md: be cautious about using ->curr_resync_completed for ->recovery_offset
The ->recovery_offset shows how much of a non-InSync device is actually
in sync - how much has been recoveryed.

When performing a recovery, ->curr_resync and ->curr_resync_completed
follow the device address being recovered and so can be used to update
->recovery_offset.

When performing a reshape, ->curr_resync* might follow the device
addresses (raid5) or might follow array addresses (raid10), so cannot
in general be used to set ->recovery_offset.  When reshaping backwards,
->curre_resync* measures from the *end* of the array-or-device, so is
particularly unhelpful.

So change the common code in md.c to only use ->curr_resync_complete
for the simple recovery case, and add code to raid5.c to update
->recovery_offset during a forwards reshape.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
2017-11-09 07:29:40 -08:00
..
2016-11-01 09:43:26 -06:00
2017-05-08 17:15:12 -07:00
2017-08-28 11:47:18 -04:00
2017-06-09 09:27:32 -06:00
2017-06-09 09:27:32 -06:00
2017-11-01 21:32:25 -07:00
2017-11-01 21:32:24 -07:00
2017-11-01 21:32:22 -07:00
2017-11-01 21:32:22 -07:00