Blame SOURCES/0027-Assemble.c-Don-t-ignore-faulty-disk-when-array-is-au.patch

59ea72
From 7298c9a6facea469d9e7ed55a7a0806500096415 Mon Sep 17 00:00:00 2001
59ea72
From: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
59ea72
Date: Thu, 7 Jun 2018 14:47:47 +0200
59ea72
Subject: [RHEL7.5 PATCH 1/1] Assemble.c Don't ignore faulty disk when array is
59ea72
 auto assembled.
59ea72
59ea72
Since commit 20dc76d15b40 ("imsm: Set disk slot number") mdadm
59ea72
sets slot number for each disk in imsm array. Now auto-assemble determines
59ea72
devices using slot number and ignores devices on the same slot that have
59ea72
older generation number.
59ea72
It causes infinit loop if failed device is still visible in system
59ea72
(it has metadata, but it is not merged with exisiting array).
59ea72
59ea72
To avoid it, out-of-sync device should be added to the best[]. Later
59ea72
mdadm adds it as spare to the container.
59ea72
59ea72
Imsm doesn't support disk replacement feature, so it can use rooms for
59ea72
replacements.
59ea72
59ea72
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
59ea72
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
59ea72
---
59ea72
 Assemble.c | 2 ++
59ea72
 1 file changed, 2 insertions(+)
59ea72
59ea72
diff --git a/Assemble.c b/Assemble.c
59ea72
index e83d550..32e6f6f 100644
59ea72
--- a/Assemble.c
59ea72
+++ b/Assemble.c
59ea72
@@ -779,6 +779,8 @@ static int load_devices(struct devs *devices, char *devmap,
59ea72
 			if (best[i] == -1 || (devices[best[i]].i.events
59ea72
 					      < devices[devcnt].i.events))
59ea72
 				best[i] = devcnt;
59ea72
+			else if (st->ss == &super_imsm)
59ea72
+				best[i+1] = devcnt;
59ea72
 		}
59ea72
 		devcnt++;
59ea72
 	}
59ea72
-- 
59ea72
2.7.4
59ea72