md: export helpers to stop sync_thread
authorYu Kuai <yukuai3@huawei.com>
Tue, 5 Mar 2024 07:22:59 +0000 (15:22 +0800)
committerSong Liu <song@kernel.org>
Tue, 5 Mar 2024 20:53:32 +0000 (12:53 -0800)
commit7a2347e284d7ec2f0759be4db60fa7ca937284fc
tree6246ffadd66cb7f1da1318ceaa12ba6dfa357f58
parent2f03d0c2cd451c7ac2f317079d4ec518f0986b55
md: export helpers to stop sync_thread

Add new helpers:

  void md_idle_sync_thread(struct mddev *mddev);
  void md_frozen_sync_thread(struct mddev *mddev);
  void md_unfrozen_sync_thread(struct mddev *mddev);

The helpers will be used in dm-raid in later patches to fix regressions
and prevent calling md_reap_sync_thread() directly.

Cc: stable@vger.kernel.org # v6.7+
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Xiao Ni <xni@redhat.com>
Acked-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240305072306.2562024-3-yukuai1@huaweicloud.com
drivers/md/md.c
drivers/md/md.h