All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: [mdadm git pull] imsm fixes and general external metadata updates
Date: Fri, 23 Jan 2009 15:51:56 -0700	[thread overview]
Message-ID: <1232751116.7825.3.camel@dwillia2-linux.ch.intel.com> (raw)
In-Reply-To: <1232576408.2029.56.camel@dwillia2-linux.ch.intel.com>

On Wed, 2009-01-21 at 15:20 -0700, Dan Williams wrote:
> Hi Neil,
> 
> The following changes since commit 78fbcc10312649f2f4f88283e3f19dce9b205733:
>   NeilBrown (1):
>         Merge branch 'master' into scratch-3.0
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm.git devel
> 

Seems you have not pulled yet, I have appended an important fix.

Thanks,
Dan

---
imsm: fix failed disks are allowed back into the container

From: Dan Williams <dan.j.williams@intel.com>

Failed disks do not have valid serial numbers which means we will not
pick up the 'failed' status bit from the metadata entry.  Check for
dl->index == -2 to prevent failed disks from being incorporated into the
container.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 super-intel.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 0a7c34a..5c9f413 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1195,8 +1195,11 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info)
 		info->component_size = reserved;
 		s = disk->status;
 		info->disk.state  = s & CONFIGURED_DISK ? (1 << MD_DISK_ACTIVE) : 0;
-		info->disk.state |= s & FAILED_DISK ? (1 << MD_DISK_FAULTY) : 0;
 		info->disk.state |= s & SPARE_DISK ? 0 : (1 << MD_DISK_SYNC);
+		if (s & FAILED_DISK || super->disks->index == -2) {
+			info->disk.state |= 1 << MD_DISK_FAULTY;
+			info->disk.raid_disk = -2;
+		}
 	}
 
 	/* only call uuid_from_super_imsm when this disk is part of a populated container,



  reply	other threads:[~2009-01-23 22:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 22:20 [mdadm git pull] imsm fixes and general external metadata updates Dan Williams
2009-01-23 22:51 ` Dan Williams [this message]
2009-02-01 23:46 ` Neil Brown
2009-02-23 15:54   ` Doug Ledford
2009-02-23 18:58     ` Dan Williams
2009-02-23 19:53       ` Doug Ledford
2009-02-23 20:16         ` NeilBrown
2009-02-24  7:57           ` Luca Berra
2009-02-24 23:33           ` When read-only isn't read-only (was Re: [mdadm git pull] imsm fixes and general external metadata updates) John Robinson
2009-02-24 23:45             ` Greg Freemyer

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=1232751116.7825.3.camel@dwillia2-linux.ch.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --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 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.