dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/0042-imsm-save-current_vol-number.patch

f5dd7b
From b6180160f78f0182b296bdceed6419b26a6fccc7 Mon Sep 17 00:00:00 2001
f5dd7b
From: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
f5dd7b
Date: Fri, 4 Oct 2019 12:07:28 +0200
f5dd7b
Subject: [RHEL7.8 PATCH V2 42/47] imsm: save current_vol number
f5dd7b
f5dd7b
The imsm container_content routine will set curr_volume index in super
f5dd7b
for getting volume information. This flag has never been restored to
f5dd7b
original value, later other function may rely on it.
f5dd7b
f5dd7b
Restore this flag to original value.
f5dd7b
f5dd7b
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
f5dd7b
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
f5dd7b
---
f5dd7b
 super-intel.c | 2 ++
f5dd7b
 1 file changed, 2 insertions(+)
f5dd7b
f5dd7b
diff --git a/super-intel.c b/super-intel.c
f5dd7b
index a103a3f..e02bbd7 100644
f5dd7b
--- a/super-intel.c
f5dd7b
+++ b/super-intel.c
f5dd7b
@@ -7826,6 +7826,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
f5dd7b
 	int sb_errors = 0;
f5dd7b
 	struct dl *d;
f5dd7b
 	int spare_disks = 0;
f5dd7b
+	int current_vol = super->current_vol;
f5dd7b
 
f5dd7b
 	/* do not assemble arrays when not all attributes are supported */
f5dd7b
 	if (imsm_check_attributes(mpb->attributes) == 0) {
f5dd7b
@@ -7993,6 +7994,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
f5dd7b
 		rest = this;
f5dd7b
 	}
f5dd7b
 
f5dd7b
+	super->current_vol = current_vol;
f5dd7b
 	return rest;
f5dd7b
 }
f5dd7b
 
f5dd7b
-- 
f5dd7b
2.7.5
f5dd7b