[lvc-project] [PATCH 6.1] md: don't quiesce in mddev_suspend()

Ваторопин Андрей a.vatoropin at crpt.ru
Tue Dec 23 18:08:11 MSK 2025


From: Yu Kuai <yukuai3 at huawei.com>

commit b39f35ebe86d88788d85f61e83c81c308cb76727 upstream

Some levels doesn't implement "pers->quiesce", for example
raid0_quiesce() is empty, and now that all levels will drop 'active_io'
until io is done, wait for 'active_io' to be 0 is enough to make sure all
normal io is done, and percpu_ref_kill() for 'active_io' will make sure
no new normal io can be dispatched. There is no need to call
"pers->quiesce" anymore from mddev_suspend().
       
Fixes: 409c57f38017 ("md: enable suspend/resume of md devices.")
Signed-off-by: Yu Kuai <yukuai3 at huawei.com>
Link: https://lore.kernel.org/r/20230628012931.88911-2-yukuai1@huaweicloud.com
Signed-off-by: Song Liu <song at kernel.org>
Cc: stable at vger.kernel.org
Signed-off-by: Andrey Vatoropin <a.vatoropin at crpt.ru>
---
 drivers/md/md.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index a9fcfcbc2d11..23ecd77c9677 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -485,7 +485,6 @@ void mddev_suspend(struct mddev *mddev)
 	set_bit(MD_ALLOW_SB_UPDATE, &mddev->flags);
 	percpu_ref_kill(&mddev->active_io);
 	wait_event(mddev->sb_wait, percpu_ref_is_zero(&mddev->active_io));
-	mddev->pers->quiesce(mddev, 1);
 	clear_bit_unlock(MD_ALLOW_SB_UPDATE, &mddev->flags);
 	wait_event(mddev->sb_wait, !test_bit(MD_UPDATING_SB, &mddev->flags));
 
@@ -505,7 +504,6 @@ void mddev_resume(struct mddev *mddev)
 
 	percpu_ref_resurrect(&mddev->active_io);
 	wake_up(&mddev->sb_wait);
-	mddev->pers->quiesce(mddev, 0);
 
 	set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
 	md_wakeup_thread(mddev->thread);
-- 
2.43.0



More information about the lvc-project mailing list