Commit 5833db25 authored by Junxiao Bi's avatar Junxiao Bi Committed by Li Nan
Browse files

Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d"

mainline inclusion
from mainline-next-20231220
commit bed9e27baf52a09b7ba2a3714f1e24e17ced386d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8T02O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bed9e27baf52a09b7ba2a3714f1e24e17ced386d



--------------------------------

This reverts commit 5e2cf333.

That commit introduced the following race and can cause system hung.

 md_write_start:             raid5d:
 // mddev->in_sync == 1
 set "MD_SB_CHANGE_PENDING"
                            // running before md_write_start wakeup it
                             waiting "MD_SB_CHANGE_PENDING" cleared
                             >>>>>>>>> hung
 wakeup mddev->thread
 ...
 waiting "MD_SB_CHANGE_PENDING" cleared
 >>>> hung, raid5d should clear this flag
 but get hung by same flag.

The issue reverted commit fixing is fixed by last patch in a new way.

Fixes: 5e2cf333 ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d")
Cc: stable@vger.kernel.org # v5.19+
Signed-off-by: default avatarJunxiao Bi <junxiao.bi@oracle.com>
Reviewed-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20231108182216.73611-2-junxiao.bi@oracle.com


Signed-off-by: default avatarLi Nan <linan122@huawei.com>
parent 3bc48328
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment