From f170a5a9a0b5dbdd502b1014cfe040bf83da5ccf Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 14 Jan 2016 13:22:17 +1100 Subject: [PATCH] Create: fix regression in setting raid_disk Recent commit caused 'missing' declarations to not be handled correctly. Fixes: cc1799c3ddc9 ("Enable create array with write journal (--write-journal DEVICE).") Signed-off-by: NeilBrown --- Create.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Create.c b/Create.c index 21d13747..40f1b7ea 100644 --- a/Create.c +++ b/Create.c @@ -851,11 +851,14 @@ int Create(struct supertype *st, char *mddev, if (dnum >= total_slots) abort(); if (dnum == insert_point) { + raid_disk_num += 1; moved_disk = dv; continue; } - if (strcasecmp(dv->devname, "missing")==0) + if (strcasecmp(dv->devname, "missing")==0) { + raid_disk_num += 1; continue; + } if (have_container) moved_disk = NULL; if (have_container && dnum < info.array.raid_disks - 1) -- 2.47.2