[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251231070952.1233903-3-zhengqixing@huaweicloud.com>
Date: Wed, 31 Dec 2025 15:09:49 +0800
From: Zheng Qixing <zhengqixing@...weicloud.com>
To: song@...nel.org,
yukuai@...as.com
Cc: linux-raid@...r.kernel.org,
linux-kernel@...r.kernel.org,
yi.zhang@...wei.com,
yangerkun@...wei.com,
houtao1@...wei.com,
zhengqixing@...wei.com,
linan122@...artners.com
Subject: [RFC PATCH 2/5] md: clear stale sync flags when frozen before sync starts
From: Zheng Qixing <zhengqixing@...wei.com>
In md_check_recovery(), add clearing of all sync flags when sync is not
running. This fixes the issue where a sync operation is requested, then
'frozen' is executed before MD_RECOVERY_RUNNING is set, leaving stale
operation flags that cause subsequent operations to fail with EBUSY.
Signed-off-by: Zheng Qixing <zhengqixing@...wei.com>
---
drivers/md/md.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ccaa2e6fe079..52e09a9a9288 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -10336,6 +10336,9 @@ void md_check_recovery(struct mddev *mddev)
queue_work(md_misc_wq, &mddev->sync_work);
} else {
clear_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
+ clear_bit(MD_RECOVERY_SYNC, &mddev->recovery);
+ clear_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
+ clear_bit(MD_RECOVERY_CHECK, &mddev->recovery);
wake_up(&resync_wait);
}
--
2.39.2
Powered by blists - more mailing lists