On Mon, Jul 31, 2023 at 02:22:31PM +0800, Yu Kuai wrote: > Hi, > > 在 2023/07/31 11:48, Xueshi Hu 写道: > > > Well... I just said reshape can continue is not possible for raid1, and > > > this patch will cause that recovery can't continue is some cases. > > > I see. I will reread the relevant code to gain a better understanding of > > "some cases". > > It's not that complex at all, the key point is whether your changes > introduce functional changes, if so, does the effect fully evaluated. > > In this case, raid1_reshape(all the callers) will set > MD_RECOVERY_RECOVER and MD_RECOVERY_NEEDED to indicate that daemon > thread must check if recovery is needed, if so it will start recovery. > > I agree that recovery is probably not needed in this case that > raid_disks is the same, however, note that recovery can be interrupted > by user, and raid1_reshape() can be triggered by user as well, this > means following procedures will end up different: > > 1. trigger a recovery; > 2. interupt the recovery; > 3. trigger a raid1_reshape(); Sincere gratitude for your detailed response. I have been consistently misunderstanding the concept of "interrupted recovery." I now understand your concerns. Thanks, Hu > > Before this patch, the interupted recovery will continue; > > This is minor, but I can't say that no user will be affected, and I > really prefer to keep this behaviour, which means this patch can just do > some cleanup without introducing functional changes. > > Thanks, > Kuai >