diff options
| author | Li Nan <linan122@huawei.com> | 2026-01-05 19:02:56 +0800 |
|---|---|---|
| committer | Yu Kuai <yukuai@fnnas.com> | 2026-01-26 13:16:21 +0800 |
| commit | 6dd3aa08e83beeadf19f9d0f4110e5cd802a65d4 (patch) | |
| tree | 4ecb1e641e9918aa8091e2e60ee5e662b920067e /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | af9c40ff5aed8149572ae920f520df88356b7950 (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 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
