linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: neilb@suse.de
Cc: ed.ciechanowski@intel.com, marcin.labun@intel.com,
	linux-raid@vger.kernel.org
Subject: [PATCH] md: make recovery started by do_md_run() visible via sync_action
Date: Mon, 21 Dec 2009 18:18:36 -0700	[thread overview]
Message-ID: <20091222011305.27523.26165.stgit@dwillia2-linux.ch.intel.com> (raw)

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>
---
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");


             reply	other threads:[~2009-12-22  1:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22  1:18 Dan Williams [this message]
2009-12-30  1:37 ` [PATCH] md: make recovery started by do_md_run() visible via sync_action Neil Brown
2009-12-30  4:17   ` Neil Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091222011305.27523.26165.stgit@dwillia2-linux.ch.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=marcin.labun@intel.com \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).