Assemble: return correct status from assemble_container_content.
Otherwise autoassembly can get confused. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
f7ad3ccc77
commit
7cb2aa33e5
|
@ -1216,7 +1216,7 @@ int assemble_container_content(struct supertype *st, int mdfd,
|
||||||
else if (errno == EEXIST)
|
else if (errno == EEXIST)
|
||||||
preexist++;
|
preexist++;
|
||||||
if (working == 0)
|
if (working == 0)
|
||||||
/* Nothing new, don't try to start */ ;
|
return 1;/* Nothing new, don't try to start */
|
||||||
else if (runstop > 0 ||
|
else if (runstop > 0 ||
|
||||||
(working + preexist) >= content->array.working_disks) {
|
(working + preexist) >= content->array.working_disks) {
|
||||||
|
|
||||||
|
@ -1249,15 +1249,16 @@ int assemble_container_content(struct supertype *st, int mdfd,
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
wait_for(chosen_name);
|
wait_for(chosen_name);
|
||||||
|
return 0;
|
||||||
/* FIXME should have an O_EXCL and wait for read-auto */
|
/* FIXME should have an O_EXCL and wait for read-auto */
|
||||||
} else
|
} else {
|
||||||
if (verbose >= 0)
|
if (verbose >= 0)
|
||||||
fprintf(stderr, Name
|
fprintf(stderr, Name
|
||||||
": %s assembled with %d devices but "
|
": %s assembled with %d devices but "
|
||||||
"not started\n",
|
"not started\n",
|
||||||
chosen_name, working);
|
chosen_name, working);
|
||||||
|
return 1;
|
||||||
return 0;
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue