summaryrefslogtreecommitdiff
path: root/Documentation/arch
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2023-12-28 20:55:51 +0800
committerSong Liu <song@kernel.org>2024-02-05 15:23:58 -0800
commit61c90765e131e63ead773b9b99167415e246a945 (patch)
tree47089c3a374c58e150385f830737436b56555037 /Documentation/arch
parent3bca7640b4c50621b94365a1746f4b86116fec56 (diff)
md: remove redundant check of 'mddev->sync_thread'
The lifetime of sync_thread: 1) Set MD_RECOVERY_NEEDED and wake up daemon thread (by ioctl/sysfs or other events); 2) Daemon thread woke up, md_check_recovery() found that MD_RECOVERY_NEEDED is set: a) try to grab reconfig_mutex; b) set MD_RECOVERY_RUNNING; c) clear MD_RECOVERY_NEEDED, and then queue sync_work; 3) md_start_sync() choose sync_action, then register sync_thread; 4) md_do_sync() is done, set MD_RECOVERY_DONE and wake up daemon thread; 5) Daemon thread woke up, md_check_recovery() found that MD_RECOVERY_DONE is set: a) try to grab reconfig_mutex; b) unregister sync_thread; c) clear MD_RECOVERY_RUNNING and MD_RECOVERY_DONE; Hence there is no such case that MD_RECOVERY_RUNNING is not set, while sync_thread is registered. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20231228125553.2697765-2-yukuai1@huaweicloud.com
Diffstat (limited to 'Documentation/arch')
0 files changed, 0 insertions, 0 deletions