]> git.ipfire.org Git - thirdparty/mdadm.git/commit
imsm: update metadata correctly while raid10 double degradation
authorMariusz Tkaczyk <mariusz.tkaczyk@intel.com>
Wed, 17 Oct 2018 10:11:41 +0000 (12:11 +0200)
committerJes Sorensen <jsorensen@fb.com>
Thu, 6 Dec 2018 12:46:40 +0000 (07:46 -0500)
commitd7a1fda2769ba272d89de6caeab35d52b73a9c3c
treebc2eb8f5ac72c63a0dae76be63f7ea3e64bff287
parent7cd7e91ab3de5aa75dc963cb08b0618c1885cf0d
imsm: update metadata correctly while raid10 double degradation

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@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
super-intel.c