From: Dan Williams Date: Tue, 22 Dec 2009 01:18:36 +0000 (-0700) Subject: md: make recovery started by do_md_run() visible via sync_action X-Git-Tag: v5.15~31001^2~2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=a2d79c324ac0c26ae9995a312a7731067a7f01fc;p=mirror_ubuntu-kernels.git md: make recovery started by do_md_run() visible via sync_action By default md_do_sync() will perform recovery if no other actions are specified. However, action_show() relies on MD_RECOVERY_RECOVER to be set otherwise it returns 'idle'. So, add a missing set MD_RECOVERY_RECOVER when starting recovery. Signed-off-by: Dan Williams Signed-off-by: NeilBrown --- diff --git a/drivers/md/md.c b/drivers/md/md.c index d2aff7209070..fd55f2a555b1 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -4436,6 +4436,7 @@ static int do_md_run(mddev_t * mddev) if (spares && mddev->pers->sync_request) { mddev->recovery = 0; set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); + set_bit(MD_RECOVERY_RECOVER, &mddev->recovery); mddev->sync_thread = md_register_thread(md_do_sync, mddev, "resync");