Skip to content

Conversation

kpd-daemon[bot]
Copy link

@kpd-daemon kpd-daemon bot commented Sep 2, 2025

Pull request for series with
subject: md: prevent incorrect update of resync/recovery offset
version: 2
url: https://patchwork.kernel.org/project/linux-raid/list/?series=997392

@kpd-daemon
Copy link
Author

kpd-daemon bot commented Sep 2, 2025

Upstream branch: c17fb54
series: https://patchwork.kernel.org/project/linux-raid/list/?series=997392
version: 2

@kpd-daemon
Copy link
Author

kpd-daemon bot commented Sep 4, 2025

Upstream branch: c17fb54
series: https://patchwork.kernel.org/project/linux-raid/list/?series=998740
version: 3

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 <[email protected]>
@kpd-daemon kpd-daemon bot added V3 and removed V2 V2-ci-pass labels Sep 4, 2025
@kpd-daemon kpd-daemon bot force-pushed the series/997392=>md-6.16 branch from 998c140 to dd04511 Compare September 4, 2025 07:50
@kpd-daemon kpd-daemon bot added the V3-ci-pass label Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants