diff options
author | NeilBrown <neilb@suse.de> | 2010-11-22 20:58:06 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-11-22 20:58:06 +1100 |
commit | 6e57f80a9005ab354ce7602b3ce0c7d7a0d239cb (patch) | |
tree | 4ab052e63fb915c7b06465dda254df23ebca146c /Incremental.c | |
parent | aaccda440691a5f9d5c986a90333a218db1f8a6c (diff) |
Incr/spare: make sure failure to identify metadata if handled gracefully.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
-rw-r--r-- | Incremental.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Incremental.c b/Incremental.c index 44e83ba3..de7fa6f0 100644 --- a/Incremental.c +++ b/Incremental.c @@ -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); |