Commit 2e86337
committed
md: fix sync_action incorrect display during resync
JIRA: https://issues.redhat.com/browse/RHEL-94433
commit b7ee30f
Author: Zheng Qixing <zhengqixing@huawei.com>
Date: Sat Aug 16 08:25:34 2025 +0800
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 happened
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 <zhengqixing@huawei.com>
Link: https://lore.kernel.org/linux-raid/20250816002534.1754356-3-zhengqixing@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>1 parent 4a3aa02 commit 2e86337
1 file changed
+35
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4874 | 4874 | | |
4875 | 4875 | | |
4876 | 4876 | | |
| 4877 | + | |
| 4878 | + | |
| 4879 | + | |
| 4880 | + | |
| 4881 | + | |
| 4882 | + | |
| 4883 | + | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + | |
| 4887 | + | |
| 4888 | + | |
| 4889 | + | |
| 4890 | + | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
| 4897 | + | |
| 4898 | + | |
| 4899 | + | |
4877 | 4900 | | |
4878 | 4901 | | |
4879 | 4902 | | |
| 4903 | + | |
4880 | 4904 | | |
4881 | 4905 | | |
4882 | 4906 | | |
| |||
4900 | 4924 | | |
4901 | 4925 | | |
4902 | 4926 | | |
4903 | | - | |
4904 | | - | |
| 4927 | + | |
| 4928 | + | |
| 4929 | + | |
| 4930 | + | |
| 4931 | + | |
| 4932 | + | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
4905 | 4938 | | |
4906 | 4939 | | |
4907 | 4940 | | |
| |||
0 commit comments