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

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