On 10/10/22 8:40 AM, Guoqing Jiang wrote:
diff --git a/drivers/md/md.c b/drivers/md/md.c
index afaf36b2f6ab..5a7134e3c182 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3979,6 +3979,9 @@ level_store(struct mddev *mddev, const char
*buf, size_t len)
goto out_unlock;
}
+ /* Only accept IO after takeover is done */
+ mddev->pers = NULL;
+
/* Looks like we have a winner */
mddev_suspend(mddev);
mddev->pers->quiesce is called in suspend/resume, so we need relevant
checking in them
accordingly, maybe other places as well.
Thanks,
Guoqing