Revert change to handling of -empty-string- metadata.
If the metadata is an empty string, it means the array in question
does not use metadata. This comes from sysfs_read finding "none" in
"metadata_version", then super_by_fd noticing the vers == -1, and so
just using the ->text_version (which is empty).
In this case we want to use the super0 metadata handler routines
because that is what we always used to do before
commit 7d5c3964cc
And that commit was wrong because "" doesn't mean "default" and so
should not have been changed at the same time.
Reported-by: martin f. krafft <madduck@debian.org>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
d492df0307
commit
5082750467
3
super0.c
3
super0.c
|
@ -922,7 +922,8 @@ static struct supertype *match_metadata_desc0(char *arg)
|
|||
while (arg[0] == '0' && arg[1] == '0')
|
||||
arg++;
|
||||
if (strcmp(arg, "0") == 0 ||
|
||||
strcmp(arg, "0.90") == 0
|
||||
strcmp(arg, "0.90") == 0 ||
|
||||
strcmp(arg, "") == 0 /* no metadata - i.e. non_persistent */
|
||||
)
|
||||
return st;
|
||||
|
||||
|
|
Loading…
Reference in New Issue