diff options
author | Neil Brown <neilb@suse.de> | 2008-06-19 16:30:36 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-06-19 16:30:36 +1000 |
commit | 56f8add211a840faaed325bd16483b55da544e93 (patch) | |
tree | 24fcba7803e0d5f687fe4e0faaa01d54763b6e85 | |
parent | 866d136a2f75b751188dfdd490be4d64e6a14d09 (diff) | |
download | mdadm-56f8add211a840faaed325bd16483b55da544e93.tar.gz mdadm-56f8add211a840faaed325bd16483b55da544e93.tar.xz mdadm-56f8add211a840faaed325bd16483b55da544e93.zip |
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).
-rw-r--r-- | super0.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 */ |