dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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