summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-06-07 23:16:35 +0000
committerNeil Brown <neilb@suse.de>2005-06-07 23:16:35 +0000
commiteaac7dde0997d00241fea29b6e23659b7d167a65 (patch)
tree63a686a4607274b7bf16d119aa2c33cac1fd334e
parentc82f047cfceb479c9c6b56b44c196018af050e45 (diff)
downloadmdadm-eaac7dde0997d00241fea29b6e23659b7d167a65.tar.gz
Fix create bug which initialised superblocks wrongly.
Description... Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
-rw-r--r--Create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Create.c b/Create.c
index e1b1737..de9a44f 100644
--- a/Create.c
+++ b/Create.c
@@ -417,12 +417,12 @@ int Create(struct supertype *st, char *mddev, int mdfd,
disk.minor = minor(stb.st_rdev);
close(fd);
}
- if (disk.state != 1)
switch(pass){
case 1:
st->ss->add_to_super(super, &disk);
break;
case 2:
+ if (disk.state == 1) break;
st->ss->write_init_super(st, super, &disk, dv->devname);
if (ioctl(mdfd, ADD_NEW_DISK, &disk)) {