diff mbox series

[1/5] md: don't ignore suspended array in md_check_recovery()

Message ID 20240120103734.4155446-2-yukuai1@huaweicloud.com (mailing list archive)
State Superseded, archived
Delegated to: Mike Snitzer
Headers show
Series md: fix/prevent dm-raid regressions | expand

Commit Message

Yu Kuai Jan. 20, 2024, 10:37 a.m. UTC
From: Yu Kuai <yukuai3@huawei.com>

mddev_suspend() never stop sync_thread, hence it dones't make sense to
ignore suspended array in md_check_recovery(), which might cause
sync_thread can't be unregistered.

Before this patch, use stop_sync_thread() directly for syspended array
will hang because md_check_recovery() can't clear MD_RECOVERY_RUNING,
which is possible for dm-raid.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
 drivers/md/md.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 2266358d8074..07b80278eaa5 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -9469,9 +9469,6 @@  static void md_start_sync(struct work_struct *ws)
  */
 void md_check_recovery(struct mddev *mddev)
 {
-	if (READ_ONCE(mddev->suspended))
-		return;
-
 	if (mddev->bitmap)
 		md_bitmap_daemon_work(mddev);