summaryrefslogtreecommitdiff
path: root/debian/patches/0027-Assemble.c-Don-t-ignore-faulty-disk-when-array-is-au.patch
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-07-23 11:41:17 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2018-07-23 11:41:17 +0100
commit3bed5265f9c792edfcd593eeaa93675711e5e264 (patch)
tree60fcbcc5048f276f07022b12d9b34245a6e8ae8d /debian/patches/0027-Assemble.c-Don-t-ignore-faulty-disk-when-array-is-au.patch
parent9421e599c44cd50d3df4cd019cd3c53d9320e93d (diff)
Cherrypick master patches up to 20th of July 2018. LP: #1781427
Diffstat (limited to 'debian/patches/0027-Assemble.c-Don-t-ignore-faulty-disk-when-array-is-au.patch')
-rw-r--r--debian/patches/0027-Assemble.c-Don-t-ignore-faulty-disk-when-array-is-au.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/debian/patches/0027-Assemble.c-Don-t-ignore-faulty-disk-when-array-is-au.patch b/debian/patches/0027-Assemble.c-Don-t-ignore-faulty-disk-when-array-is-au.patch
new file mode 100644
index 00000000..76f4b27d
--- /dev/null
+++ b/debian/patches/0027-Assemble.c-Don-t-ignore-faulty-disk-when-array-is-au.patch
@@ -0,0 +1,41 @@
+From 7298c9a6facea469d9e7ed55a7a0806500096415 Mon Sep 17 00:00:00 2001
+From: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
+Date: Thu, 7 Jun 2018 14:47:47 +0200
+Subject: [PATCH 27/40] Assemble.c Don't ignore faulty disk when array is auto
+ assembled.
+
+Since commit 20dc76d15b40 ("imsm: Set disk slot number") mdadm
+sets slot number for each disk in imsm array. Now auto-assemble determines
+devices using slot number and ignores devices on the same slot that have
+older generation number.
+It causes infinit loop if failed device is still visible in system
+(it has metadata, but it is not merged with exisiting array).
+
+To avoid it, out-of-sync device should be added to the best[]. Later
+mdadm adds it as spare to the container.
+
+Imsm doesn't support disk replacement feature, so it can use rooms for
+replacements.
+
+Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
+Signed-off-by: Jes Sorensen <jsorensen@fb.com>
+---
+ Assemble.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Assemble.c b/Assemble.c
+index e83d550b..32e6f6ff 100644
+--- a/Assemble.c
++++ b/Assemble.c
+@@ -779,6 +779,8 @@ static int load_devices(struct devs *devices, char *devmap,
+ if (best[i] == -1 || (devices[best[i]].i.events
+ < devices[devcnt].i.events))
+ best[i] = devcnt;
++ else if (st->ss == &super_imsm)
++ best[i+1] = devcnt;
+ }
+ devcnt++;
+ }
+--
+2.17.1
+