]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: save current_vol number
authorMariusz Tkaczyk <mariusz.tkaczyk@intel.com>
Fri, 4 Oct 2019 10:07:28 +0000 (12:07 +0200)
committerJes Sorensen <jsorensen@fb.com>
Fri, 4 Oct 2019 15:00:40 +0000 (11:00 -0400)
The imsm container_content routine will set curr_volume index in super
for getting volume information. This flag has never been restored to
original value, later other function may rely on it.

Restore this flag to original value.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
super-intel.c

index a103a3fc0cdd6a32898e85f5c44de8a27c6b1552..e02bbd7a7d4290cb66e745f4f4dad979f61a37d7 100644 (file)
@@ -7826,6 +7826,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
        int sb_errors = 0;
        struct dl *d;
        int spare_disks = 0;
+       int current_vol = super->current_vol;
 
        /* do not assemble arrays when not all attributes are supported */
        if (imsm_check_attributes(mpb->attributes) == 0) {
@@ -7993,6 +7994,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
                rest = this;
        }
 
+       super->current_vol = current_vol;
        return rest;
 }