Create: don't wait for device to appear if we didn't actually start the array
Otherwise we get an unpleasant 2 second pause when array creation fails. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
4408ee768b
commit
01cbfcc854
2
Create.c
2
Create.c
|
@ -780,11 +780,11 @@ int Create(struct supertype *st, char *mddev,
|
|||
ping_monitor(devnum2devname(st->container_dev));
|
||||
close(container_fd);
|
||||
}
|
||||
wait_for(chosen_name);
|
||||
} else {
|
||||
fprintf(stderr, Name ": not starting array - not enough devices.\n");
|
||||
}
|
||||
close(mdfd);
|
||||
wait_for(chosen_name);
|
||||
return 0;
|
||||
|
||||
abort:
|
||||
|
|
Loading…
Reference in New Issue