On 10/17/18 6:11 AM, Mariusz Tkaczyk wrote: > Mdmon calls end_migration() when map state changes from normal to > degraded. It is not valid because in raid 10 double degradation case > mdmon breaks checkpointing but array is still rebuilding. > In this case mdmon has to mark map as degraded and continues marking > recovery checkpoint in metadata. Migration can be finished only if newly > failed device is a rebuilding device. > > Add catching double degraded to degraded transition. Migration is > finished but map state doesn't change, array is still degraded. > > Update failed_disk_num correctly. If double degradation > happens rebuild will start on the lowest slot, but this variable points > to the first failed slot. If second fail happens while rebuild this > variable shouldn't be updated until rebuild is not finished. > > Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@xxxxxxxxx> > --- > super-intel.c | 25 +++++++++++++++++++------ > 1 file changed, 19 insertions(+), 6 deletions(-) Applied and apologies for the delay! Thanks, Jes