[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9c1867c7-167b-4ce0-a7cb-053bf641a125@fnnas.com>
Date: Sat, 8 Nov 2025 18:30:04 +0800
From: "Yu Kuai" <yukuai@...as.com>
To: <linan666@...weicloud.com>, <song@...nel.org>, <neil@...wn.name>,
<namhyung@...il.com>
Cc: <linux-raid@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<xni@...hat.com>, <k@...l.me>, <yangerkun@...wei.com>,
<yi.zhang@...wei.com>, <yukuai@...as.com>
Subject: Re: [PATCH v2 07/11] md: factor out sync completion update into helper
在 2025/11/6 19:59, linan666@...weicloud.com 写道:
> Repeatedly reading 'mddev->recovery' flags in md_do_sync() may introduce
> potential risk if this flag is modified during sync, leading to incorrect
> offset updates. Therefore, replace direct 'mddev->recovery' checks with
> 'action'.
>
> Move sync completion update logic into helper md_finish_sync(), which
> improves readability and maintainability.
>
> The reshape completion update remains safe as it only updated after
> successful reshape when MD_RECOVERY_INTR is not set and 'curr_resync'
> equals 'max_sectors'.
>
> Signed-off-by: Li Nan<linan122@...wei.com>
> ---
> drivers/md/md.c | 82 ++++++++++++++++++++++++++++---------------------
> 1 file changed, 47 insertions(+), 35 deletions(-)
LGTM
Reviewed-by: Yu Kuai <yukuai@...as.com>
Powered by blists - more mailing lists