Blame SOURCES/mdadm-3.4-imsm-add-handling-of-sync_action-is-equal-to-idle.patch

7bdf8f
From b2be2b628b6305712c8df0b3a20ddddc0ac410fb Mon Sep 17 00:00:00 2001
7bdf8f
From: Alexey Obitotskiy <aleksey.obitotskiy@intel.com>
7bdf8f
Date: Thu, 16 Jun 2016 11:31:36 +0200
7bdf8f
Subject: [PATCH 1/2] imsm: add handling of sync_action is equal to 'idle'
7bdf8f
7bdf8f
After resync is stopped sync_action value become 'idle'.
7bdf8f
We treat this case as normal termination of waiting, not as error.
7bdf8f
7bdf8f
Signed-off-by: Alexey Obitotskiy <aleksey.obitotskiy@intel.com>
7bdf8f
Reviewed-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
7bdf8f
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
7bdf8f
---
7bdf8f
 super-intel.c | 4 +++-
7bdf8f
 1 file changed, 3 insertions(+), 1 deletion(-)
7bdf8f
7bdf8f
diff --git a/super-intel.c b/super-intel.c
7bdf8f
index 7e2860c..7950bef 100644
7bdf8f
--- a/super-intel.c
7bdf8f
+++ b/super-intel.c
7bdf8f
@@ -10423,6 +10423,8 @@ int wait_for_reshape_imsm(struct mdinfo *sra, int ndata)
7bdf8f
 		if (sysfs_get_str(sra, NULL, "sync_action",
7bdf8f
 				  action, 20) > 0 &&
7bdf8f
 				strncmp(action, "reshape", 7) != 0) {
7bdf8f
+			if (strncmp(action, "idle", 4) == 0)
7bdf8f
+				break;
7bdf8f
 			close(fd);
7bdf8f
 			return -1;
7bdf8f
 		}
7bdf8f
@@ -10432,9 +10434,9 @@ int wait_for_reshape_imsm(struct mdinfo *sra, int ndata)
7bdf8f
 			return 1;
7bdf8f
 		}
7bdf8f
 	} while (completed < position_to_set);
7bdf8f
+
7bdf8f
 	close(fd);
7bdf8f
 	return 0;
7bdf8f
-
7bdf8f
 }
7bdf8f
 
7bdf8f
 /*******************************************************************************
7bdf8f
-- 
7bdf8f
2.5.5
7bdf8f