]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
md: make recovery started by do_md_run() visible via sync_action
authorDan Williams <dan.j.williams@intel.com>
Tue, 22 Dec 2009 01:18:36 +0000 (18:18 -0700)
committerNeilBrown <neilb@suse.de>
Wed, 30 Dec 2009 04:20:31 +0000 (15:20 +1100)
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@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c

index d2aff72090709d89ba31010ba9b9f6492ee9360c..fd55f2a555b1e6fb43156b96e5aa30286e8aa961 100644 (file)
@@ -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");