From 9277cc7752ae6eb4b10dff7b5fc9ec75d3d52b66 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 24 Nov 2009 16:32:01 +1100 Subject: Various fixes for --kill - When --kill-superblock is used with --metadata, find every different superblock if there are several and kill them all. - When creating a new array, kill off any old metadata. The code to do this was already present but has become broken over time. Signed-off-by: NeilBrown --- super0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'super0.c') diff --git a/super0.c b/super0.c index 15b3ca2..0485a3a 100644 --- a/super0.c +++ b/super0.c @@ -725,8 +725,8 @@ static int write_init_super0(struct supertype *st) continue; if (di->fd == -1) continue; - Kill(di->devname, 0, 1, 1); - Kill(di->devname, 0, 1, 1); + while (Kill(di->devname, NULL, 0, 1, 1) == 0) + ; sb->disks[di->disk.number].state &= ~(1<