diff options
| author | 2026-01-05 19:02:56 +0800 | |
|---|---|---|
| committer | 2026-01-26 13:16:21 +0800 | |
| commit | 6dd3aa08e83beeadf19f9d0f4110e5cd802a65d4 (patch) | |
| tree | 4ecb1e641e9918aa8091e2e60ee5e662b920067e /include/rdma/ssh:/git@git.zx2c4.com | |
| parent | md: remove MD_RECOVERY_ERROR handling and simplify resync_offset update (diff) | |
md: factor out sync completion update into helper
Repeatedly reading 'mddev->recovery' flags in md_do_sync() may introduce
potential risk if this flag is modified during sync, leading to incorrect
offset updates. Therefore, replace direct 'mddev->recovery' checks with
'action'.
Move sync completion update logic into helper md_finish_sync(), which
improves readability and maintainability.
The reshape completion update remains safe as it only updated after
successful reshape when MD_RECOVERY_INTR is not set and 'curr_resync'
equals 'max_sectors'.
Link: https://lore.kernel.org/linux-raid/20260105110300.1442509-9-linan666@huaweicloud.com
Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Yu Kuai <yukuai@fnnas.com>
Signed-off-by: Yu Kuai <yukuai@fnnas.com>
Diffstat (limited to 'include/rdma/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
