dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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