Signed-off-by: Xiao Ni <xni@xxxxxxxxxx> --- Create.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Create.c b/Create.c index 239545f..50142d8 100644 --- a/Create.c +++ b/Create.c @@ -475,6 +475,10 @@ int Create(struct supertype *st, char *mddev, close(fd); } } + if (missing_disks == dnum) { + pr_err("Subdevs can't be all missing\n"); + return 1; + } if (s->raiddisks + s->sparedisks > st->max_devs) { pr_err("Too many devices: %s metadata only supports %d\n", st->ss->name, st->max_devs); -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html