Re: [PATCH] md/raid5: fix deadlock that raid5d() wait for itself to clear MD_SB_CHANGE_PENDING

From: Song Liu
Date: Wed Apr 10 2024 - 17:38:06 EST


On Fri, Mar 22, 2024 at 1:17 AM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:
[...]
>
> Refer to the implementation from raid1 and raid10, fix this problem by
> skipping issue IO if MD_SB_CHANGE_PENDING is still set after
> md_check_recovery(), daemon thread will be woken up when 'reconfig_mutex'
> is released. Meanwhile, the hang problem will be fixed as well.
>
> Fixes: 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d")
> Reported-and-tested-by: Dan Moulding <dan@xxxxxxxx>
> Closes: https://lore.kernel.org/all/20240123005700.9302-1-dan@xxxxxxxx/
> Investigated-by: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
> Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>

Applied to md-6.10. Thanks!

Song