dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/IncrementalScan-Use-md_array_active-instead-of-mdge.patch

b7f731
From 00e56fd9537e1f69583d8b0f60faf02026f24d1b Mon Sep 17 00:00:00 2001
b7f731
From: Jes Sorensen <jsorensen@fb.com>
b7f731
Date: Fri, 5 May 2017 12:18:29 -0400
b7f731
Subject: [RHEL7.5 PATCH 115/169] IncrementalScan: Use md_array_active()
b7f731
 instead of md_get_array_info()
b7f731
b7f731
This eliminates yet another case where GET_ARRAY_INFO was used to
b7f731
indicate whether the array was active.
b7f731
b7f731
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
b7f731
---
b7f731
 Incremental.c | 3 +--
b7f731
 1 file changed, 1 insertion(+), 2 deletions(-)
b7f731
b7f731
diff --git a/Incremental.c b/Incremental.c
b7f731
index b73eabd..680d318 100644
b7f731
--- a/Incremental.c
b7f731
+++ b/Incremental.c
b7f731
@@ -1317,7 +1317,6 @@ int IncrementalScan(struct context *c, char *devnm)
b7f731
 
b7f731
 restart:
b7f731
 	for (me = mapl ; me ; me = me->next) {
b7f731
-		mdu_array_info_t array;
b7f731
 		struct mdinfo *sra;
b7f731
 		int mdfd;
b7f731
 
b7f731
@@ -1362,7 +1361,7 @@ restart:
b7f731
 				rv = 1;
b7f731
 			continue;
b7f731
 		}
b7f731
-		if (md_get_array_info(mdfd, &array) == 0 || errno != ENODEV) {
b7f731
+		if (md_array_active(mdfd)) {
b7f731
 			close(mdfd);
b7f731
 			continue;
b7f731
 		}
b7f731
-- 
b7f731
2.7.4
b7f731