From 3f6efecc4ccc4b5e50ade7368cf825c372cda0cf Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sun, 28 Sep 2008 12:12:07 -0700 Subject: [PATCH] imsm: determine failed indexes from the most up-to-date disk load_imsm_disk() currently notices if spares missed their activation update, but we allow a stale failed disk back in to the array because its serial number is clobbered in the most up-to-date disk. Signed-off-by: Dan Williams --- super-intel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/super-intel.c b/super-intel.c index 7f8dd348..df3184aa 100644 --- a/super-intel.c +++ b/super-intel.c @@ -1097,6 +1097,13 @@ load_imsm_disk(int fd, struct intel_super *super, char *devname, int keep_fd) } } + /* no match, maybe a stale failed drive */ + if (i == super->anchor->num_disks && dl->index >= 0) { + dl->disk = *__get_imsm_disk(super->anchor, dl->index); + if (__le32_to_cpu(dl->disk.status) & FAILED_DISK) + dl->index = -2; + } + if (alloc) super->disks = dl; -- 2.39.2