Commit cf98589
md: fix sync_action incorrect display during resync
During raid resync, if a disk becomes faulty, the operation is
briefly interrupted. The MD_RECOVERY_RECOVER flag triggered by
the disk failure causes sync_action to incorrectly show "recover"
instead of "resync". The same issue affects reshape operations.
Reproduction steps:
mdadm -Cv /dev/md1 -l1 -n4 -e1.2 /dev/sd{a..d} // -> resync happended
mdadm -f /dev/md1 /dev/sda // -> resync interrupted
cat sync_action
-> recover
Add progress checks in md_sync_action() for resync/recover/reshape
to ensure the interface correctly reports the actual operation type.
Fixes: 4b10a3b ("md: ensure resync is prioritized over recovery")
Signed-off-by: Zheng Qixing <[email protected]>1 parent 672753f commit cf98589
1 file changed
+35
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4831 | 4831 | | |
4832 | 4832 | | |
4833 | 4833 | | |
| 4834 | + | |
| 4835 | + | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
| 4839 | + | |
| 4840 | + | |
| 4841 | + | |
| 4842 | + | |
| 4843 | + | |
| 4844 | + | |
| 4845 | + | |
| 4846 | + | |
| 4847 | + | |
| 4848 | + | |
| 4849 | + | |
| 4850 | + | |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
| 4856 | + | |
4834 | 4857 | | |
4835 | 4858 | | |
4836 | 4859 | | |
| 4860 | + | |
4837 | 4861 | | |
4838 | 4862 | | |
4839 | 4863 | | |
| |||
4857 | 4881 | | |
4858 | 4882 | | |
4859 | 4883 | | |
4860 | | - | |
4861 | | - | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + | |
| 4887 | + | |
| 4888 | + | |
| 4889 | + | |
| 4890 | + | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
4862 | 4895 | | |
4863 | 4896 | | |
4864 | 4897 | | |
| |||
0 commit comments