Commit c1fdc90
committed
md: prevent incorrect update of resync/recovery offset
JIRA: https://issues.redhat.com/browse/RHEL-94433
commit 7202082
Author: Li Nan <linan122@huawei.com>
Date: Thu Sep 4 15:34:52 2025 +0800
md: prevent incorrect update of resync/recovery offset
In md_do_sync(), when md_sync_action returns ACTION_FROZEN, subsequent
call to md_sync_position() will return MaxSector. This causes
'curr_resync' (and later 'recovery_offset') to be set to MaxSector too,
which incorrectly signals that recovery/resync has completed, even though
disk data has not actually been updated.
To fix this issue, skip updating any offset values when the sync action
is FROZEN. The same holds true for IDLE.
Fixes: 7d9f107 ("md: use new helpers in md_do_sync()")
Signed-off-by: Li Nan <linan122@huawei.com>
Link: https://lore.kernel.org/linux-raid/20250904073452.3408516-1-linan666@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>1 parent a0b3023 commit c1fdc90
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9151 | 9151 | | |
9152 | 9152 | | |
9153 | 9153 | | |
| 9154 | + | |
| 9155 | + | |
| 9156 | + | |
| 9157 | + | |
| 9158 | + | |
9154 | 9159 | | |
9155 | 9160 | | |
9156 | 9161 | | |
| |||
0 commit comments