All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org, wojciech.neubauer@intel.com,
	adam.kwolek@intel.com, dan.j.williams@intel.com,
	ed.ciechanowski@intel.com
Subject: [PATCH 5/6] FIX: Reset disk state if disk is missing
Date: Wed, 19 Jan 2011 17:23:41 +0100	[thread overview]
Message-ID: <20110119162341.8738.83269.stgit@gklab-128-111.igk.intel.com> (raw)
In-Reply-To: <20110119161925.8738.85284.stgit@gklab-128-111.igk.intel.com>

If we can't read actual disk state, it shoud be initiated
to 0.
Overwise it may be out of date value resulting false action
later in code (e.g. set disk to improper state).


Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
---
 monitor.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/monitor.c b/monitor.c
index b7287d8..ed3ce49 100644
--- a/monitor.c
+++ b/monitor.c
@@ -232,6 +232,8 @@ static int read_and_act(struct active_array *a)
 		if (mdi->state_fd >= 0) {
 			mdi->recovery_start = read_resync_start(mdi->recovery_fd);
 			mdi->curr_state = read_dev_state(mdi->state_fd);
+		} else {
+			mdi->curr_state = 0;
 		}
 	}
 


  parent reply	other threads:[~2011-01-19 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 16:23 [PATCH 0/6] A few fixes connected with raid0<->raid10 takeover Krzysztof Wojcik
2011-01-19 16:23 ` [PATCH 1/6] Limit no-restriping operations only for raid5 Krzysztof Wojcik
2011-01-26  1:01   ` Neil Brown
2011-01-26 11:56     ` Wojcik, Krzysztof
2011-01-19 16:23 ` [PATCH 2/6] FIX: Ping manager after level change Krzysztof Wojcik
2011-01-19 16:23 ` [PATCH 3/6] Check number of failed disks durig raid10->raid0 takeover Krzysztof Wojcik
2011-01-19 16:23 ` [PATCH 4/6] FIX: Remove disks in mdmon for external metadata Krzysztof Wojcik
2011-01-26  1:04   ` Neil Brown
2011-01-26 13:00     ` Wojcik, Krzysztof
2011-01-19 16:23 ` Krzysztof Wojcik [this message]
2011-01-19 16:23 ` [PATCH 6/6] FIX: Unblock disk in kernel only if it is blocked Krzysztof Wojcik
2011-01-26  1:06   ` Neil Brown
2011-01-26 14:22     ` Wojcik, Krzysztof

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=20110119162341.8738.83269.stgit@gklab-128-111.igk.intel.com \
    --to=krzysztof.wojcik@intel.com \
    --cc=adam.kwolek@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=wojciech.neubauer@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.