[PATCH] md: make recovery started by do_md_run() visible via sync_action

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <dan.j.williams@xxxxxxxxx>
---
Hi Neil,

One more to finish off recovery checkpoint support.  Without this mdmon
never notices that the array was rebuilding and never marks the
completion.  I did not see any urgency to workaround this in the mdadm
patchset, but let me know if you think a "kernel version > 2.6.33-rcX"
check is warranted.

Thanks,
Dan

 drivers/md/md.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 1cc5f2d..fa93de0 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4286,6 +4286,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");

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux