From: Neil Brown Date: Thu, 19 Jun 2008 06:30:36 +0000 (+1000) Subject: Fix an error when assembling arrays that are in the middle of a reshape. X-Git-Tag: mdadm-2.6.7.2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b9d24da5bdb88f5668d795f22c93911f55682f6;p=thirdparty%2Fmdadm.git Fix an error when assembling arrays that are in the middle of a reshape. It is important that dup_super always returns an 'st' with the same ->ss and ->minor_version as the st that was passed. This wasn't happening for 0.91 metadata (i.e. in the middle of a reshape). --- diff --git a/super0.c b/super0.c index 7e814829..8e4c568e 100644 --- a/super0.c +++ b/super0.c @@ -849,12 +849,15 @@ static struct supertype *match_metadata_desc0(char *arg) st->sb = NULL; if (strcmp(arg, "0") == 0 || strcmp(arg, "0.90") == 0 || - strcmp(arg, "0.91") == 0 || strcmp(arg, "default") == 0 || strcmp(arg, "") == 0 /* no metadata */ ) return st; + st->minor_version = 91; /* reshape in progress */ + if (strcmp(arg, "0.91") == 0) /* For dup_super support */ + return st; + st->minor_version = 9; /* flag for 'byte-swapped' */ if (strcmp(arg, "0.swap")==0 || strcmp(arg, "0.9") == 0) /* For dup_super support */