dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/Incremental-Use-md_array_active-to-determine3-state-o.patch

2c1b57
From 6921010d95dbc32c812aa8ffdbfa28e78b54b342 Mon Sep 17 00:00:00 2001
2c1b57
From: Jes Sorensen <jsorensen@fb.com>
2c1b57
Date: Tue, 2 May 2017 10:36:51 -0400
2c1b57
Subject: [RHEL7.5 PATCH 101/169] Incremental: Use md_array_active() to
2c1b57
 determine state of array
2c1b57
2c1b57
One less call to md_get_array_info()
2c1b57
2c1b57
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
2c1b57
---
2c1b57
 Incremental.c | 3 +--
2c1b57
 1 file changed, 1 insertion(+), 2 deletions(-)
2c1b57
2c1b57
diff --git a/Incremental.c b/Incremental.c
2c1b57
index 4789e36..8909f2f 100644
2c1b57
--- a/Incremental.c
2c1b57
+++ b/Incremental.c
2c1b57
@@ -99,7 +99,6 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
2c1b57
 	int active_disks;
2c1b57
 	int trustworthy;
2c1b57
 	char *name_to_use;
2c1b57
-	mdu_array_info_t ainf;
2c1b57
 	struct dev_policy *policy = NULL;
2c1b57
 	struct map_ent target_array;
2c1b57
 	int have_target;
2c1b57
@@ -551,7 +550,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
2c1b57
 	/*   + add any bitmap file  */
2c1b57
 	/*   + start the array (auto-readonly). */
2c1b57
 
2c1b57
-	if (md_get_array_info(mdfd, &ainf) == 0) {
2c1b57
+	if (md_array_active(mdfd)) {
2c1b57
 		if (c->export) {
2c1b57
 			printf("MD_STARTED=already\n");
2c1b57
 		} else if (c->verbose >= 0)
2c1b57
-- 
2c1b57
2.7.4
2c1b57