Blame SOURCES/0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch

8fbece
From 0833f9c3dbaaee202b92ea956f9e2decc7b9593a Mon Sep 17 00:00:00 2001
8fbece
From: Gioh Kim <gi-oh.kim@profitbricks.com>
8fbece
Date: Tue, 6 Nov 2018 15:27:42 +0100
8fbece
Subject: [RHEL7.7 PATCH 01/24] Assemble: keep MD_DISK_FAILFAST and
8fbece
 MD_DISK_WRITEMOSTLY flag
8fbece
8fbece
Before updating superblock of slave disks, desired_state value
8fbece
is set for the target state of the slave disks. But it forgets
8fbece
to check MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY flags. Then
8fbece
start_arrays() calls ADD_NEW_DISK ioctl-call and pass the state
8fbece
without MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY.
8fbece
8fbece
Currenlty it does not generate any problem because kernel does not
8fbece
care MD_DISK_FAILFAST or MD_DISK_WRITEMOSTLY flags.
8fbece
8fbece
Reviewed-by: NeilBrown <neilb@suse.com>
8fbece
Signed-off-by: Gioh Kim <gi-oh.kim@profitbricks.com>
8fbece
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
8fbece
---
8fbece
 Assemble.c | 3 +++
8fbece
 1 file changed, 3 insertions(+)
8fbece
8fbece
diff --git a/Assemble.c b/Assemble.c
8fbece
index a79466c..f39c9e1 100644
8fbece
--- a/Assemble.c
8fbece
+++ b/Assemble.c
8fbece
@@ -1704,6 +1704,9 @@ try_again:
8fbece
 		else
8fbece
 			desired_state = (1<
8fbece
 
8fbece
+		desired_state |= devices[j].i.disk.state & ((1<
8fbece
+							    (1<
8fbece
+
8fbece
 		if (!devices[j].uptodate)
8fbece
 			continue;
8fbece
 
8fbece
-- 
8fbece
2.7.5
8fbece