ddf/intel: zero out old metadata before creating a container.

Matching the functionality already in super0 and super1, when
we first create a container, remove any other recognisable metadata to
ensure it doesn't cause confusion.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2010-03-10 15:55:47 +11:00
parent a847575aa1
commit d682f3445c
2 changed files with 10 additions and 2 deletions

View File

@ -2413,8 +2413,12 @@ static int write_init_super_ddf(struct supertype *st)
/* FIXME I need to close the fds! */
return 0;
} else
} else {
struct dl *d;
for (d = ddf->dlist; d; d=d->next)
while (Kill(d->devname, NULL, 0, 1, 1) == 0);
return __write_init_super_ddf(st, 1);
}
}
#endif

View File

@ -3441,8 +3441,12 @@ static int write_init_super_imsm(struct supertype *st)
}
return rv;
} else
} else {
struct dl *d;
for (d = super->disks; d; d = d->next)
Kill(d->devname, NULL, 0, 1, 1);
return write_super_imsm(st->sb, 1);
}
}
#endif