[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48421f04-6c37-8d76-2130-39ba38e6e437@huaweicloud.com>
Date: Tue, 6 Jan 2026 21:07:44 +0800
From: Li Nan <linan666@...weicloud.com>
To: Zheng Qixing <zhengqixing@...weicloud.com>, 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: Re: [RFC PATCH 2/5] md: clear stale sync flags when frozen before
sync starts
在 2025/12/31 15:09, Zheng Qixing 写道:
> 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);
> }
>
Merge into one with the previous fix patch. Do not introduce an issue
and fix it later.
--
Thanks,
Nan
Powered by blists - more mailing lists