From: NeilBrown Date: Wed, 22 Jun 2005 00:17:10 +0000 (-0700) Subject: [PATCH] md: make sure recovery happens when add_new_disk is used for hot_add X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c361777fb9347a4d16b82272f7d3b234e94bef2d;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] md: make sure recovery happens when add_new_disk is used for hot_add Currently if add_new_disk is used to hot-add a drive to a degraded array, recovery doesn't start ... because we didn't tell it to. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index d899204d3743..60835dfd058e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2083,6 +2083,8 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info) err = bind_rdev_to_array(rdev, mddev); if (err) export_rdev(rdev); + + set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); if (mddev->thread) md_wakeup_thread(mddev->thread); return err;