dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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