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 4/6] FIX: Remove disks in mdmon for external metadata
Date: Wed, 19 Jan 2011 17:23:33 +0100	[thread overview]
Message-ID: <20110119162333.8738.79313.stgit@gklab-128-111.igk.intel.com> (raw)
In-Reply-To: <20110119161925.8738.85284.stgit@gklab-128-111.igk.intel.com>

For raid10 -> raid0 takeover operation we shoud reject disks
in mirror by mark them as 'failed' and then remove them from
array.
For external metadata second action should be execuded by
mdmon so additional condition is necessary.

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

diff --git a/Grow.c b/Grow.c
index 78d5b0e..c5f83a8 100644
--- a/Grow.c
+++ b/Grow.c
@@ -711,7 +711,9 @@ int remove_disks_on_raid10_to_raid0_takeover(struct supertype *st,
 
 		sysfs_set_str(sra, sd, "state", "faulty");
 		sysfs_set_str(sra, sd, "slot", "none");
-		sysfs_set_str(sra, sd, "state", "remove");
+		/* for external metadata disks should be removed in mdmon */
+		if (!st->ss->external)
+			sysfs_set_str(sra, sd, "state", "remove");
 		sd->disk.state |= (1<<MD_DISK_REMOVED);
 		sd->disk.state &= ~(1<<MD_DISK_SYNC);
 		sd->next = sra->devs;


  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 ` Krzysztof Wojcik [this message]
2011-01-26  1:04   ` [PATCH 4/6] FIX: Remove disks in mdmon for external metadata Neil Brown
2011-01-26 13:00     ` Wojcik, Krzysztof
2011-01-19 16:23 ` [PATCH 5/6] FIX: Reset disk state if disk is missing Krzysztof Wojcik
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=20110119162333.8738.79313.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.