summaryrefslogtreecommitdiffstats
path: root/super1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-11-24 16:32:01 +1100
committerNeilBrown <neilb@suse.de>2009-11-24 16:32:01 +1100
commit9277cc7752ae6eb4b10dff7b5fc9ec75d3d52b66 (patch)
tree08d95ee3f170369863288356c84e45d87b93d876 /super1.c
parent40bc78f5cd292d90917cb0a8c177498a516494c3 (diff)
downloadmdadm-9277cc7752ae6eb4b10dff7b5fc9ec75d3d52b66.tar.gz
mdadm-9277cc7752ae6eb4b10dff7b5fc9ec75d3d52b66.tar.xz
mdadm-9277cc7752ae6eb4b10dff7b5fc9ec75d3d52b66.zip
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 <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/super1.c b/super1.c
index 5a2df0e..2c992a4 100644
--- a/super1.c
+++ b/super1.c
@@ -1016,8 +1016,8 @@ static int write_init_super1(struct supertype *st)
if (di->fd < 0)
continue;
- Kill(di->devname, 0, 1, 1);
- Kill(di->devname, 0, 1, 1);
+ while (Kill(di->devname, NULL, 0, 1, 1) == 0)
+ ;
sb->dev_number = __cpu_to_le32(di->disk.number);
if (di->disk.state & (1<<MD_DISK_WRITEMOSTLY))