dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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