Incr/spare: make sure failure to identify metadata if handled gracefully.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2010-11-22 20:58:06 +11:00
parent aaccda4406
commit 6e57f80a90
1 changed files with 7 additions and 0 deletions

View File

@ -820,6 +820,13 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
for(i=0; !st2 && superlist[i]; i++)
st2 = superlist[i]->match_metadata_desc(
sra->text_version);
if (!st2) {
if (verbose > 1)
fprintf(stderr, Name ": not adding %s to %s"
" as metadata not recognised.\n",
devname, mp->path);
goto next;
}
} else
st2 = st;
get_dev_size(dfd, NULL, &devsize);