dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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